You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2022/08/16 04:15:00 UTC

[jira] [Assigned] (FLINK-28965) Should create empty partition when it's for dynamic partition

     [ https://issues.apache.org/jira/browse/FLINK-28965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu reassigned FLINK-28965:
-------------------------------

    Assignee: tartarus

> Should create empty partition when it's for dynamic partition
> -------------------------------------------------------------
>
>                 Key: FLINK-28965
>                 URL: https://issues.apache.org/jira/browse/FLINK-28965
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Hive
>    Affects Versions: 1.16.0
>            Reporter: luoyuxia
>            Assignee: tartarus
>            Priority: Critical
>             Fix For: 1.16.0
>
>
> Can be reproduced by the following code in HiveDialectTest:
>  
> {code:java}
> tableEnv.executeSql(
>         "create table over1k_part_orc(\n"
>                 + "           si smallint,\n"
>                 + "           i int,\n"
>                 + "           b bigint,\n"
>                 + "           f float)\n"
>                 + "       partitioned by (ds string, t tinyint) stored as orc");
> tableEnv.executeSql(
>         "create table over1k(\n"
>                 + "           t tinyint,\n"
>                 + "           si smallint,\n"
>                 + "           i int,\n"
>                 + "           b bigint,\n"
>                 + "           f float,\n"
>                 + "           d double,\n"
>                 + "           bo boolean,\n"
>                 + "           s string,\n"
>                 + "           ts timestamp,\n"
>                 + "           dec decimal(4,2),\n"
>                 + "           bin binary)");
> tableEnv.executeSql(
>                 "insert overwrite table over1k_part_orc partition(ds=\"foo\", t)"
>                         + " select si,i,b,f,t from over1k where t is null or t=27 order by si")
>         .await(); {code}
>  
> Althogh it's for dynamic partition, the current code will try to create a partition for it (ds='foo') when there's no data wrotten to it , so the exception will be thrown since the partition spec (ds='foo') is not full path
> {code:java}
> Caused by: MetaException(message:Invalid partition key & values; keys [ds, t, ], values [foo, ]) {code}
>  



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