Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-35561][SQL] Remove leading zeros from empty static number type…
… partition ### What changes were proposed in this pull request? This PR removes leading zeros from static number type partition when we insert into a partition table with empty partitions. create table CREATE TABLE `table_int` ( `id` INT, `c_string` STRING, `p_int` int) USING parquet PARTITIONED BY (p_int); insert insert overwrite table table_int partition (p_int='00011') select 1, 'c string' where true ; |partition| |---------| |p_int=11| insert overwrite table table_int partition (p_int='00012') select 1, 'c string' where false ; |partition| |---------| |p_int=00012| ### Why are the changes needed? This PR creates consistent result when insert empty or non-empty partition ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Add Unit test Closes #33291 from dgd-contributor/35561_insert_integer_partition_fail_when_empty. Authored-by: dgd-contributor <dgd_contributor@viettel.com.vn> Signed-off-by: Sean Owen <srowen@gmail.com>
- Loading branch information