danny0405 commented on a change in pull request #10224: [FLINK-14716][table-planner-blink] Cooperate computed column with push down rules URL: https://github.com/apache/flink/pull/10224#discussion_r347250063
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sources/TableSourceUtil.scala ########## @@ -177,9 +181,92 @@ object TableSourceUtil { } if (selectedFields.isDefined) { // filter field names and types by selected fields - (selectedFields.get.map(fieldNames(_)), selectedFields.get.map(fieldTypes(_))) + fieldNames = selectedFields.get.map(fieldNames(_)) + fieldTypes = selectedFields.get.map(fieldTypes(_)) + } + typeFactory.buildRelNodeRowType(fieldNames, fieldTypes) + } + + /** + * Returns schema of the selected fields of the given [[TableSource]]. + * + * @param typeFactory Type factory to create the type + * @param fieldNameArray Field names to build the row type + * @param fieldDataTypeArray Field data types to build the row type + * @param watermarkSpec Watermark specifications defined through DDL + * @param selectedFields The indices of all selected fields. None, if all fields are selected + * @param streaming Flag to determine whether the schema of a stream or batch table is created + * @return The row type for the selected fields of the given [[TableSource]], this type would + * also be patched with time attributes defined in the give [[WatermarkSpec]] + */ + def getSourceRowType( Review comment: Thanks, i can't move it out because another method `def getSourceRowType` reference it in `TableSourceUtil`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services