hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <>
Subject [jira] [Commented] (HIVE-20284) In strict mode, if constant propagation is enable, the partition filter is folded before partition pruner lead to error "No partition predicate for Alias"
Date Wed, 01 Aug 2018 10:19:00 GMT


Hive QA commented on HIVE-20284:

Here are the results of testing the latest attachment:

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 8 failed/errored test(s), 14839 tests executed
*Failed tests:*
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[compare_string_bigint] (batchId=97)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[compare_string_bigint_2] (batchId=97)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[input4] (batchId=97)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[input4_2] (batchId=98)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[strict_join] (batchId=96)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[strict_join_2] (batchId=97)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[strict_orderby] (batchId=97)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[strict_orderby_2] (batchId=97)

Test results:
Console output:
Test logs:

Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 8 tests failed

This message is automatically generated.

ATTACHMENT ID: 12933882 - PreCommit-HIVE-Build

> In strict mode, if constant propagation is enable, the partition filter is folded before
partition pruner lead to error "No partition predicate for Alias"  
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: HIVE-20284
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 1.2.1, 2.3.3
>            Reporter: Hui Huang
>            Assignee: Hui Huang
>            Priority: Trivial
>             Fix For: 2.3.3, 4.0.0
>         Attachments: HIVE-20284.1.patch, HIVE-20284.patch
> In strict mode and the hive.optimize.constant.propagation is set to true, the following
sql will failed:
> {code:java}
> hive> desc employee_part;
> OK
> col_name	data_type	comment
> eid                 	int
> name                	string
> dept                	string
> year                	string
> month               	string
> # Partition Information
> # col_name            	data_type           	comment
> year                	string
> month               	string
> Time taken: 0.564 seconds, Fetched: 11 row(s)
> hive> set hive.mapred.mode=strict;
> hive> select * from employee_part where false and concat(year,month)='201807';
> FAILED: SemanticException Queries against partitioned tables without a partition filter
are disabled for safety reasons. If you know what you are doing, please sethive.strict.checks.large.query
to false and that hive.mapred.mode is not set to 'strict' to proceed. Note that if you may
get errors or incorrect results if you make a mistake while using some of the unsafe features.
No partition predicate for Alias "employee_part" Table "employee_part"
> {code}
> The above error msg is confusing,  concat(year,month)='201807' is the partition filter。
> The reason is during logic optimization, the ConstantPropagate optimizer is running before
partitionPruner optimizer, when found a express like 'false and concat(year,month)=xxxx',
the express is replaced with 'fasle' , and the partition filter is dropped. So the PartitionPruner
can not get the partition filter.
> Users can remove the constant express that always has true/false values to work around.
> When views used, if some columns are constant values, users  will be  confusing.
> So we should add some more message in the error msg returned.

This message was sent by Atlassian JIRA

View raw message