Airblader commented on a change in pull request #16984:
URL: https://github.com/apache/flink/pull/16984#discussion_r695737989
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/source/abilities/SupportsReadingMetadata.java
##########
@@ -128,4 +128,19 @@
* @see DecodingFormat#applyReadableMetadata(List)
*/
void applyReadableMetadata(List<String> metadataKeys, DataType
producedDataType);
+
+ /**
+ * Defines whether projections can be applied to metadata columns.
+ *
+ * <p>This method is only called if the source does <em>not</em> implement
{@link
+ * SupportsProjectionPushDown}. In this case, by default the planner will
apply all metadata
+ * declared in a table's schema. By returning {@code true} instead the
source can inform the
+ * planner that it should only apply metadata columns which have actually
been selected.
+ *
+ * <p>If the source implements {@link SupportsProjectionPushDown},
projections of metadata
+ * columns are always considered before calling {@link
#applyReadableMetadata(List, DataType)}.
+ */
+ default boolean supportsMetadataProjection() {
Review comment:
@wuchong @JingsongLi Just involving you here since we were discussing
this on JIRA.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]