lirui-apache commented on a change in pull request #15638:
URL: https://github.com/apache/flink/pull/15638#discussion_r644776270



##########
File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/HiveCatalogTest.java
##########
@@ -120,4 +120,23 @@ public void testRetrieveFlinkProperties() throws Exception 
{
         assertEquals(
                 hiveTable.getOptions().get("flink.url"), 
"jdbc:clickhouse://host:port/testUrl2");
     }
+
+    @Test
+    public void testGetNoSchemaGenericTable() throws Exception {
+        ObjectPath hiveObjectPath =
+                new ObjectPath(HiveCatalog.DEFAULT_DB, 
"testGetNoSchemaGenericTable");
+
+        Map<String, String> properties =
+                new HashMap<>(new 
FileSystem().path("/test_path").toProperties());

Review comment:
       Why we need these properties?

##########
File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/HiveCatalogTest.java
##########
@@ -120,4 +120,23 @@ public void testRetrieveFlinkProperties() throws Exception 
{
         assertEquals(
                 hiveTable.getOptions().get("flink.url"), 
"jdbc:clickhouse://host:port/testUrl2");
     }
+
+    @Test
+    public void testGetNoSchemaGenericTable() throws Exception {
+        ObjectPath hiveObjectPath =
+                new ObjectPath(HiveCatalog.DEFAULT_DB, 
"testGetNoSchemaGenericTable");
+
+        Map<String, String> properties =
+                new HashMap<>(new 
FileSystem().path("/test_path").toProperties());
+
+        properties.put(CONNECTOR.key(), "jdbc");
+
+        hiveCatalog.createTable(
+                hiveObjectPath,
+                new CatalogTableImpl(TableSchema.builder().build(), 
properties, null),
+                false);
+
+        CatalogBaseTable hiveTable = hiveCatalog.getTable(hiveObjectPath);
+        assertEquals(TableSchema.builder().build(), hiveTable.getSchema());

Review comment:
       ```suggestion
           CatalogBaseTable catalogTable = hiveCatalog.getTable(hiveObjectPath);
           assertEquals(TableSchema.builder().build(), 
catalogTable.getSchema());
   ```

##########
File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/HiveCatalogTest.java
##########
@@ -120,4 +120,23 @@ public void testRetrieveFlinkProperties() throws Exception 
{
         assertEquals(
                 hiveTable.getOptions().get("flink.url"), 
"jdbc:clickhouse://host:port/testUrl2");
     }
+
+    @Test
+    public void testGetNoSchemaGenericTable() throws Exception {
+        ObjectPath hiveObjectPath =
+                new ObjectPath(HiveCatalog.DEFAULT_DB, 
"testGetNoSchemaGenericTable");
+
+        Map<String, String> properties =
+                new HashMap<>(new 
FileSystem().path("/test_path").toProperties());

Review comment:
       But you're already setting 'connector' to jdbc right?




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