You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ranga Reddy (Jira)" <ji...@apache.org> on 2022/11/13 04:00:00 UTC

[jira] [Comment Edited] (SPARK-40798) Alter partition should verify value

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

Ranga Reddy edited comment on SPARK-40798 at 11/13/22 3:59 AM:
---------------------------------------------------------------

Hi [~ulysses] 

The current Jira will solve both the *Insert* and *Alter* partition values. 
{code:java}
CREATE EXTERNAL TABLE test_partition_value_tbl ( id INT, name STRING ) PARTITIONED BY (age INT) LOCATION 'file:/tmp/spark-warehouse/test_partition_value_tbl';

-- This DDL should fail but worked:
ALTER TABLE test_partition_value_tbl ADD PARTITION(age='aaa'); 

-- This DML should fail but worked:
INSERT INTO test_partition_value_tbl PARTITION(age="aaa") VALUES (1, 'ABC');{code}
Can we rename *SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION* variable and update the description of this variable?

*Note:* We have a *spark.sql.sources.validatePartitionColumns* {color:#172b4d}parameter and used while reading the partition value.  This variable only we can reuse?{color}

After that, I will commit my test case.


was (Author: rangareddy.avula@gmail.com):
Hi [~ulysses] 

The current Jira will solve both the *Insert* and *Alter* partition values. 
{code:java}
CREATE EXTERNAL TABLE test_partition_value_tbl ( id INT, name STRING ) PARTITIONED BY (age INT) LOCATION 'file:/tmp/spark-warehouse/test_partition_value_tbl'

-- This DDL should fail but worked:
ALTER TABLE test_partition_value_tbl ADD PARTITION(age='aaa'); 

-- This DML should fail but worked:
INSERT INTO test_partition_value_tbl PARTITION(age="aaa") VALUES (1, 'ABC'){code}
Can we rename *SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION* variable and update the description of this variable?

After that, I will commit my test case.

> Alter partition should verify value
> -----------------------------------
>
>                 Key: SPARK-40798
>                 URL: https://issues.apache.org/jira/browse/SPARK-40798
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: XiDuo You
>            Assignee: XiDuo You
>            Priority: Major
>             Fix For: 3.4.0
>
>
>  
> {code:java}
> CREATE TABLE t (c int) USING PARQUET PARTITIONED BY(p int);
> -- This DDL should fail but worked:
> ALTER TABLE t ADD PARTITION(p='aaa'); {code}



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

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