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

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

YuanGuanhu created SPARK-35561:
----------------------------------

             Summary: 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.1.2, 3.1.1, 3.0.2
            Reporter: YuanGuanhu


when inserting into partitioned table with int datatype partition column, if partition column value is starting with 0, like 001, get wrong partition result

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