wuchong 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_r347229401
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/plan/FlinkCalciteCatalogReaderTest.java
 ##########
 @@ -66,21 +65,25 @@ public void init() {
        }
 
        @Test
-       public void testGetFlinkTable() {
-               FlinkTable flinkTableMock = mock(FlinkTable.class);
-               
when(flinkTableMock.getRowType(typeFactory)).thenReturn(mock(RelDataType.class));
-               rootSchemaPlus.add(tableMockName, flinkTableMock);
-               Prepare.PreparingTable resultTable = 
catalogReader.getTable(Arrays.asList(tableMockName));
-
-               assertTrue(resultTable instanceof FlinkRelOptTable);
+       public void testGetCatalogSchemaTable() {
+               CatalogSchemaTable mockTable = mock(CatalogSchemaTable.class);
+               
when(mockTable.getRowType(typeFactory)).thenReturn(mock(RelDataType.class));
+               rootSchemaPlus.add(tableMockName, mockTable);
+               try {
+                       
catalogReader.getTable(Collections.singletonList(tableMockName));
+                       fail("Unexpected exception");
+               } catch (NullPointerException npe) {
+                       // no-op
 
 Review comment:
   Why this test should throw NPE exception ???
   I didn't find any reason we can't get table for the `tableMockName`. If 
there is any reason, pelase add comments in this test.

----------------------------------------------------------------
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

Reply via email to