YuvalItzchakov commented on pull request #15307: URL: https://github.com/apache/flink/pull/15307#issuecomment-813994209
@fsk119 What I see is that when the `CatalogTable` is converted into a `TableSourceTable`, `DynamicSourceUtils.createdProducedType` ignores any computed column and only emits physical + metadata columns: ```java /** * Returns the {@link DataType} that a source should produce as the input into the runtime. * * <p>The format looks as follows: {@code PHYSICAL COLUMNS + METADATA COLUMNS} * * <p>Physical columns use the table schema's name. Metadata column use the metadata key as * name. */ public static RowType createProducedType(ResolvedSchema schema, DynamicTableSource source) { final Map<String, DataType> metadataMap = extractMetadataMap(source); final Stream<RowField> physicalFields = ((RowType) schema.toPhysicalRowDataType().getLogicalType()).getFields().stream(); final Stream<RowField> metadataFields = createRequiredMetadataKeys(schema, source).stream() .map(k -> new RowField(k, metadataMap.get(k).getLogicalType())); final List<RowField> rowFields = Stream.concat(physicalFields, metadataFields).collect(Collectors.toList()); return new RowType(false, rowFields); } ``` Not sure whether this is a bug or not. -- 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