[
https://issues.apache.org/jira/browse/HIVE-29782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramit Gupta updated HIVE-29782:
-------------------------------
Description:
steps to reproduce:
run below q file using TestMiniLlapLocalCliDriver
[^test.q]
and this will run into following error:
{code:java}
alter view vp_dec add partition (p_dec=99.50) fname=partitioned_view_add_parts.q
See ./ql/target/tmp/log/hive.log or ./itests/qtest/target/tmp/log/hive.log, or
check ./ql/target/surefire-reports or ./itests/qtest/target/surefire-reports/
for specific test cases logs.
org.apache.hadoop.hive.ql.parse.SemanticException: Queries against partitioned
tables without a partition filter are disabled for safety reasons. If you know
what you are doing, please set hive.strict.checks.no.partition.filter to false
and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note
that you may get errors or incorrect results if you make a mistake while using
some of the unsafe features. at
org.apache.hadoop.hive.ql.ddl.table.partition.add.AlterViewAddPartitionAnalyzer.postProcess(AlterViewAddPartitionAnalyzer.java:95)
at
org.apache.hadoop.hive.ql.ddl.table.partition.add.AbstractAddPartitionAnalyzer.analyzeCommand(AbstractAddPartitionAnalyzer.java:77)
at
org.apache.hadoop.hive.ql.ddl.table.AbstractAlterTableAnalyzer.analyzeInternal(AbstractAlterTableAnalyzer.java:67)
at
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:359)
{code}
this will not occur if partitioned on a string column and also the error
message is wrong as well because the query contains the partition filter which
error message is denying
was:
steps to reproduce:
{code:java}
CREATE TABLE src_t (label string, p_int int) STORED AS ORC;
INSERT INTO src_t VALUES ('row1', 42);
CREATE VIEW vp_int PARTITIONED ON (p_int) AS SELECT label, p_int FROM src_t;
ALTER VIEW vp_int ADD PARTITION (p_int=42); –- fail and run into exception
{code}
this will not occur if partitioned on a string column
> ALTER VIEW ADD PARTITION does not honor non string partition columns
> --------------------------------------------------------------------
>
> Key: HIVE-29782
> URL: https://issues.apache.org/jira/browse/HIVE-29782
> Project: Hive
> Issue Type: Bug
> Reporter: Ramit Gupta
> Assignee: Ramit Gupta
> Priority: Major
> Labels: pull-request-available
> Attachments: test.q
>
>
>
> steps to reproduce:
> run below q file using TestMiniLlapLocalCliDriver
> [^test.q]
> and this will run into following error:
> {code:java}
> alter view vp_dec add partition (p_dec=99.50)
> fname=partitioned_view_add_parts.q
> See ./ql/target/tmp/log/hive.log or ./itests/qtest/target/tmp/log/hive.log,
> or check ./ql/target/surefire-reports or
> ./itests/qtest/target/surefire-reports/ for specific test cases logs.
> org.apache.hadoop.hive.ql.parse.SemanticException: Queries against
> partitioned tables without a partition filter are disabled for safety
> reasons. If you know what you are doing, please set
> hive.strict.checks.no.partition.filter to false and make sure that
> hive.mapred.mode is not set to 'strict' to proceed. Note that you may get
> errors or incorrect results if you make a mistake while using some of the
> unsafe features. at
> org.apache.hadoop.hive.ql.ddl.table.partition.add.AlterViewAddPartitionAnalyzer.postProcess(AlterViewAddPartitionAnalyzer.java:95)
> at
> org.apache.hadoop.hive.ql.ddl.table.partition.add.AbstractAddPartitionAnalyzer.analyzeCommand(AbstractAddPartitionAnalyzer.java:77)
> at
> org.apache.hadoop.hive.ql.ddl.table.AbstractAlterTableAnalyzer.analyzeInternal(AbstractAlterTableAnalyzer.java:67)
> at
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:359)
> {code}
> this will not occur if partitioned on a string column and also the error
> message is wrong as well because the query contains the partition filter
> which error message is denying
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)