luoyuxia commented on code in PR #22620:
URL: https://github.com/apache/flink/pull/22620#discussion_r1200414609
##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveLookupJoinITCase.java:
##########
@@ -182,7 +182,7 @@ public void testPartitionFetcherAndReader() throws
Exception {
batchEnv.registerCatalog(hiveCatalog.getName(), hiveCatalog);
batchEnv.useCatalog(hiveCatalog.getName());
batchEnv.executeSql(
- "insert overwrite partition_table values "
+ "insert overwrite table partition_table values "
Review Comment:
Hive don't support `insert overwrite partition_table`, it should be `insert
overwrite table partition_table`;
##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java:
##########
@@ -574,11 +574,11 @@ public void testGetFunctionWithPattern() throws Exception
{
try (Statement statement = connection.createStatement()) {
statement.execute(
String.format(
- "CREATE FUNCTION
`hive`.`db_test2`.`my_abs` as '%s'",
+ "CREATE FUNCTION `db_test2`.`my_abs`
as '%s'",
Review Comment:
Hive dialect don't support create function with name `catalog.db.name`, it
should be `db.name`.
##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/TableEnvHiveConnectorITCase.java:
##########
@@ -279,22 +279,22 @@ public void testUDTF() throws Exception {
List<Row> results =
CollectionUtil.iteratorToList(
tableEnv.sqlQuery(
- "select x from db1.simple, lateral
table(hiveudtf(a)) as T(x)")
+ "select x from db1.simple lateral
view hiveudtf(a) udtf_t as x")
Review Comment:
Hive doesn't support lateral table.
##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/endpoint/hive/HiveServer2EndpointITCase.java:
##########
@@ -632,7 +632,7 @@ public void testExecuteStatementInSyncMode() throws
Exception {
TCLIService.Client client = createClient();
TSessionHandle sessionHandle = client.OpenSession(new
TOpenSessionReq()).getSessionHandle();
TOperationHandle operationHandle =
- client.ExecuteStatement(new
TExecuteStatementReq(sessionHandle, "SHOW CATALOGS"))
+ client.ExecuteStatement(new
TExecuteStatementReq(sessionHandle, "SHOW DATABASES"))
Review Comment:
Hive dialect doesn't support `SHOW CATALOGS`, so we change to use `SHOW
DATABASES`.
##########
flink-connectors/flink-connector-hive/src/test/resources/query-test/sub_query.q:
##########
@@ -12,7 +12,7 @@ select * from src x join src y on x.key = y.key where exists
(select * from src
[+I[1, val1, 1, val1], +I[2, val2, 2, val2], +I[3, val3, 3, val3]]
-select * from (select x.key from src x);
+select * from (select x.key from src x) as t;
Review Comment:
We should add `AS` clause for Hive dialect.
##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveDialectITCase.java:
##########
@@ -854,25 +853,6 @@ public void testTemporaryFunctionUDTF() throws Exception {
assertThat(functions.length).isEqualTo(0);
}
- @Test
- public void testCatalog() {
Review Comment:
Hive dialect itself doesn't support catalog releated syntax, so remove it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]