You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Franck Thang (Jira)" <ji...@apache.org> on 2021/05/31 17:10:00 UTC

[jira] [Commented] (SPARK-35561) partition result is incorrect when insert into partition table with int datatype partition column

    [ https://issues.apache.org/jira/browse/SPARK-35561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17354556#comment-17354556 ] 

Franck Thang commented on SPARK-35561:
--------------------------------------

I personally don't expect 001 because the type is an INT, if I wanted 001, I would have use the type STRING

> partition result is incorrect when insert into partition table with int datatype partition column
> -------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-35561
>                 URL: https://issues.apache.org/jira/browse/SPARK-35561
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0, 3.0.1, 3.0.2, 3.1.1, 3.1.2
>            Reporter: YuanGuanhu
>            Priority: Major
>
> when inserting into partitioned table with int datatype partition column, if partition column value is starting with 0, like 001, get wrong partition result
>  
> *How to reproduce the problem:*
> CREATE TABLE partitiontb04 (id INT, c_string STRING) STORED AS orc; 
>  insert into table partitiontb04 values (10001,'test1');
>  CREATE TABLE orc_part03(id INT, c_string STRING) partitioned by (p_int int) STORED AS orc;
>  insert into table orc_part03 partition (p_int=001) select * from partitiontb04 where id < 10006;
>  show partitions orc_part03;
> expect result:
> p_int=001
>  
> actural result:
> p_int=1
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org