luoyuxia created FLINK-32596:
--------------------------------

             Summary: The partition key will be wrong when use Flink dialect to 
create Hive table
                 Key: FLINK-32596
                 URL: https://issues.apache.org/jira/browse/FLINK-32596
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Hive
    Affects Versions: 1.17.0, 1.16.0, 1.15.0
            Reporter: luoyuxia


Can be reproduced by the following SQL:

 
{code:java}
tableEnv.getConfig().setSqlDialect(SqlDialect.DEFAULT);
tableEnv.executeSql(
        "create table t1(`date` string, `geo_altitude` FLOAT) partitioned by 
(`date`)"
                + " with ('connector' = 'hive', 
'sink.partition-commit.delay'='1 s',  
'sink.partition-commit.policy.kind'='metastore,success-file')");
CatalogTable catalogTable =
        (CatalogTable) 
hiveCatalog.getTable(ObjectPath.fromString("default.t1"));

// the following assertion will fail
assertThat(catalogTable.getPartitionKeys().toString()).isEqualTo("[date]");{code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to