godfreyhe commented on a change in pull request #13631:
URL: https://github.com/apache/flink/pull/13631#discussion_r514952517



##########
File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/plan/rules/logical/PushProjectIntoTableSourceScanRuleTest.java
##########
@@ -70,34 +70,47 @@ public void setup() {
                                                " 'bounded' = 'true'\n" +
                                                ")";
                util().tableEnv().executeSql(ddl2);
-       }
-
-       @Override
-       public void testNestedProject() {
-               expectedException().expect(TableException.class);
-               expectedException().expectMessage("Nested projection push down 
is unsupported now.");
-               testNestedProject(true);
-       }
-
-       @Test
-       public void testNestedProjectDisabled() {
-               testNestedProject(false);
-       }
 
-       private void testNestedProject(boolean nestedProjectionSupported) {
-               String ddl =
+               String ddl3 =
                                "CREATE TABLE NestedTable (\n" +
                                                "  id int,\n" +
                                                "  deepNested row<nested1 
row<name string, `value` int>, nested2 row<num int, flag boolean>>,\n" +
                                                "  nested row<name string, 
`value` int>,\n" +
+                                               "  `deepNestedWith.` 
row<`.value` int, nested row<name string, `.value` int>>,\n" +
                                                "  name string\n" +
                                                ") WITH (\n" +
                                                " 'connector' = 'values',\n" +
-                                               " 'nested-projection-supported' 
= '" + nestedProjectionSupported + "',\n" +
-                                               "  'bounded' = 'true'\n" +
+                                               " 'nested-projection-supported' 
= 'true'," +
+                                               " 'bounded' = 'true'\n" +
+                                               ")";
+               util().tableEnv().executeSql(ddl3);
+
+               String ddl4 =
+                               "CREATE TABLE MetadataTable(\n" +
+                                               "  id int,\n" +
+                                               "  deepNested row<nested1 
row<name string, `value` int>, nested2 row<num int, flag boolean>>,\n" +
+                                               "  metadata_1 int metadata,\n" +
+                                               "  metadata_2 string 
metadata\n" +
+                                               ") WITH (" +
+                                               " 'connector' = 'values'," +
+                                               " 'nested-projection-supported' 
= 'true'," +
+                                               " 'bounded' = 'true',\n" +
+                                               " 'readable-metadata' = 
'metadata_1:INT, metadata_2:STRING, metadata_3:BIGINT'" +
                                                ")";
-               util().tableEnv().executeSql(ddl);
+               util().tableEnv().executeSql(ddl4);
+       }
 
+       @Test
+       public void testProjectWithMapType() {
+               String sqlQuery =
+                               "SELECT a, d['e']\n" +
+                                               "FROM MyTable";

Review comment:
       MyTable does not support `nested-projection-supported`




----------------------------------------------------------------
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:
[email protected]


Reply via email to