[
https://issues.apache.org/jira/browse/HIVE-22877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17036137#comment-17036137
]
Hive QA commented on HIVE-22877:
--------------------------------
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12993303/HIVE-22877.1.patch
{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.
{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 17994 tests
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.metastore.TestGetPartitionsUsingProjectionAndFilterSpecs.testGetPartitionsUsingValues
(batchId=231)
{noformat}
Test results:
https://builds.apache.org/job/PreCommit-HIVE-Build/20592/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20592/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20592/
Messages:
{noformat}
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: 1 tests failed
{noformat}
This message is automatically generated.
ATTACHMENT ID: 12993303 - PreCommit-HIVE-Build
> Fix decimal boundary check for casting to Decimal64
> ---------------------------------------------------
>
> Key: HIVE-22877
> URL: https://issues.apache.org/jira/browse/HIVE-22877
> Project: Hive
> Issue Type: Bug
> Components: Vectorization
> Affects Versions: 4.0.0
> Reporter: Mustafa Iman
> Assignee: Mustafa Iman
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-22877.1.patch, HIVE-22877.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> During vectorization, decimal fields that are obtained via generic udfs are
> cast to Decimal64 in some circumstances. For decimal to decimal64 cast, hive
> compares the source column's `scale + precision` to 18(maximum number of
> digits that can be represented by a long). A decimal can fit in a long as
> long as its `precision` is smaller than or equal to 18. Scale is irrelevant.
> Since vectorized generic udf expression takes scale into account, it computes
> wrong output column vector: Decimal instead of Decimal64. This in turn causes
> ClassCastException down the operator chain.
> Below query fails with class cast exception:
>
> {code:java}
> create table mini_store
> (
> s_store_sk int,
> s_store_id string
> )
> row format delimited fields terminated by '\t'
> STORED AS ORC;
> create table mini_sales
> (
> ss_store_sk int,
> ss_quantity int,
> ss_sales_price decimal(7,2)
> )
> row format delimited fields terminated by '\t'
> STORED AS ORC;
> insert into mini_store values (1, 'store');
> insert into mini_sales values (1, 2, 1.2);
> select s_store_id, coalesce(ss_sales_price*ss_quantity,0) sumsales
> from mini_sales, mini_store where ss_store_sk = s_store_sk
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)