This is an automated email from the ASF dual-hosted git repository.

shengkai pushed a commit to branch release-1.16
in repository https://gitbox.apache.org/repos/asf/flink.git

commit fd76fb5bba579ed85da84a361a406db7af54ae9e
Author: Shengkai <[email protected]>
AuthorDate: Thu Sep 8 15:08:21 2022 +0800

    [FLINK-29228][hive] Align the schema of the HiveServer2 getMetadata with 
JDBC
---
 .../org/apache/flink/table/endpoint/hive/HiveServer2Schemas.java    | 6 +++---
 .../apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/endpoint/hive/HiveServer2Schemas.java
 
b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/endpoint/hive/HiveServer2Schemas.java
index 31c76b2d212..dd775fe7145 100644
--- 
a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/endpoint/hive/HiveServer2Schemas.java
+++ 
b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/endpoint/hive/HiveServer2Schemas.java
@@ -37,9 +37,9 @@ public class HiveServer2Schemas {
     /** Schema for {@link HiveServer2Endpoint#GetSchemas}. */
     public static final ResolvedSchema GET_SCHEMAS_SCHEMA =
             buildSchema(
-                    Column.physical("TABLE_SCHEMA", DataTypes.STRING())
+                    Column.physical("TABLE_SCHEM", DataTypes.STRING())
                             .withComment("Schema name. NULL if not 
applicable."),
-                    Column.physical("TABLE_CAT", DataTypes.STRING())
+                    Column.physical("TABLE_CATALOG", DataTypes.STRING())
                             .withComment("Catalog name. NULL if not 
applicable"));
 
     /** Schema for {@link HiveServer2Endpoint#GetTables}. */
@@ -47,7 +47,7 @@ public class HiveServer2Schemas {
             buildSchema(
                     Column.physical("TABLE_CAT", DataTypes.STRING())
                             .withComment("Catalog name. NULL if not 
applicable."),
-                    Column.physical("TABLE_SCHEMA", DataTypes.STRING())
+                    Column.physical("TABLE_SCHEM", DataTypes.STRING())
                             .withComment("Schema name. NULL if not 
applicable."),
                     Column.physical("TABLE_NAME", DataTypes.STRING())
                             .withComment("Table name. NULL if not 
applicable."),
diff --git 
a/flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java
 
b/flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java
index 19e3074ed65..5a7bd41ba0d 100644
--- 
a/flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java
+++ 
b/flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java
@@ -677,14 +677,14 @@ public class HiveServer2EndpointITCase extends TestLogger 
{
 
     private ResolvedSchema getExpectedGetSchemasOperationSchema() {
         return ResolvedSchema.of(
-                Column.physical("TABLE_SCHEMA", DataTypes.STRING()),
-                Column.physical("TABLE_CAT", DataTypes.STRING()));
+                Column.physical("TABLE_SCHEM", DataTypes.STRING()),
+                Column.physical("TABLE_CATALOG", DataTypes.STRING()));
     }
 
     private ResolvedSchema getExpectedGetTablesOperationSchema() {
         return ResolvedSchema.of(
                 Column.physical("TABLE_CAT", DataTypes.STRING()),
-                Column.physical("TABLE_SCHEMA", DataTypes.STRING()),
+                Column.physical("TABLE_SCHEM", DataTypes.STRING()),
                 Column.physical("TABLE_NAME", DataTypes.STRING()),
                 Column.physical("TABLE_TYPE", DataTypes.STRING()),
                 Column.physical("REMARKS", DataTypes.STRING()),

Reply via email to