dawidwys commented on code in PR #23412:
URL: https://github.com/apache/flink/pull/23412#discussion_r1326868368


##########
flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/batch/sql/TableSourceTest.xml:
##########
@@ -109,13 +109,13 @@ FROM T
       <![CDATA[
 LogicalProject(id=[$0], nested1=[$1.nested1], results=[+(+($1.nested1.value, 
$1.nested2.num), $2)])
 +- LogicalProject(id=[$0], deepNested=[$1], metadata_1=[$2], metadata_2=[$3])
-   +- LogicalTableScan(table=[[default_catalog, default_database, T]])
+   +- LogicalTableScan(table=[[default_catalog, default_database, T, 
metadata=[metadata_1, metadata_2]]])
 ]]>
     </Resource>
     <Resource name="optimized exec plan">
       <![CDATA[
 Calc(select=[id, deepNested_nested1 AS nested1, ((deepNested_nested1.value + 
deepNested_nested2_num) + metadata_1) AS results])
-+- TableSourceScan(table=[[default_catalog, default_database, T, project=[id, 
deepNested_nested1, deepNested_nested2_num], metadata=[metadata_1]]], 
fields=[id, deepNested_nested1, deepNested_nested2_num, metadata_1])
++- TableSourceScan(table=[[default_catalog, default_database, T, 
metadata=[metadata_1, metadata_2], project=[id, deepNested_nested1, 
deepNested_nested2_num], metadata=[metadata_1]]], fields=[id, 
deepNested_nested1, deepNested_nested2_num, metadata_1])

Review Comment:
   > I just noticed that the parenthesis are also not correct. What is going on 
here?
   
   Where are they wrong?
   
   > This looks wrong. The source should use only metadata_1. Looking at path 
revisions of this class, this was the case last year.
   
   Bear in mind there are two `ReadingMetadataSpec`. One applied during a scan 
and one during projection pushdown. That's also the case when creating the 
`ExecNode` tree that `applyReadableMetadata` is called twice.
   The spec from projection pushdown uses only `metadata_1`.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to