Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32596

The partition key will be wrong when use Flink dialect to create Hive table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.15.0, 1.16.0, 1.17.0
    • None
    • Connectors / Hive
    • None

    Description

      Can be reproduced by the following SQL:

       

      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]");

       

       

      Attachments

        1. image-2024-02-14-16-06-13-126.png
          113 kB
          Vallari Rastogi
        2. image-2024-02-15-03-05-22-541.png
          39 kB
          Vallari Rastogi
        3. image-2024-02-15-03-06-28-175.png
          157 kB
          Vallari Rastogi
        4. image-2024-02-15-03-08-50-029.png
          644 kB
          Vallari Rastogi

        Activity

          People

            walls.flink.m Vallari Rastogi
            luoyuxia luoyuxia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: