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

Jark Wu closed FLINK-28965.
---------------------------
    Resolution: Fixed

Fixed in master: e967a7b54da969c6d974a4ec6e3afcd1cc17a8be

> Shouldn't 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
>              Labels: pull-request-available
>             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)

Reply via email to