[jira] [Comment Edited] (HIVE-15406) Consider vectorizing the new 'trunc' function

2019-03-21 Thread Laszlo Bodor (JIRA)


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

Laszlo Bodor edited comment on HIVE-15406 at 3/21/19 12:22 PM:
---

thanks for the review [~kgyrtkirk]
1. the zeros are the same as in nonvectorized execution, and it may be because 
- somewhere while processing the input decimal - scale/precision is not enforced
{code}
selectExpressions: TruncDecimal(col 2, scale 0)(children: 
CastDoubleToDecimal(col 0:double) -> 2:decimal(10,5)) -> 3:decimal(38,18)
{code}

2. attached the same queries in nonvectorized mode

i agree that it could be misleading to see leading zeros when the input is 
casted to (10,5), but for now, it could remain as a sign that it should be 
reviewed later (in both vec and nonvec implementation)


was (Author: abstractdog):
thanks for the review [~kgyrtkirk]
1. the zeros are the same as in nonvectorized execution, and it may be because 
- somewhere while processing the input decimal - scale/precision is not enforced

2. attached the same queries in nonvectorized mode

i agree that it could be misleading to see leading zeros when the input is 
casted to (10,5), but for now, it could remain as a sign that it should be 
reviewed later (in both vec and nonvec implementation)

> Consider vectorizing the new 'trunc' function
> -
>
> Key: HIVE-15406
> URL: https://issues.apache.org/jira/browse/HIVE-15406
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Matt McCline
>Assignee: Laszlo Bodor
>Priority: Critical
> Attachments: HIVE-15406.01.patch, HIVE-15406.02.patch, 
> HIVE-15406.03.patch, HIVE-15406.04.patch, HIVE-15406.05.patch, 
> HIVE-15406.06.patch
>
>
> Rounding function 'trunc' added by HIVE-14582.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (HIVE-15406) Consider vectorizing the new 'trunc' function

2019-03-21 Thread Laszlo Bodor (JIRA)


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

Laszlo Bodor edited comment on HIVE-15406 at 3/21/19 12:21 PM:
---

thanks for the review [~kgyrtkirk]
1. the zeros are the same as in nonvectorized execution, and it may be because 
- somewhere while processing the input decimal - scale/precision is not enforced

2. attached the same queries in nonvectorized mode

i agree that it could be misleading to see leading zeros when the input is 
casted to (10,5), but for now, it could remain as a sign that it should be 
reviewed later (in both vec and nonvec implementation)


was (Author: abstractdog):
thanks for the review [~kgyrtkirk]
1. the zeros are the same as in nonvectorized execution, and it's because trunc 
function doesn't respect the input scale when it produces output, see: 
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTrunc.java#L448
HiveDecimal has also a constructor with scale parameter, but it's not used

2. attached the same queries in nonvectorized mode

i agree that it could be annoying to see leading zeros when the input is casted 
to (10,5), but for now, it could remain as a sign that it should be reviewed 
later (in both vec and nonvec implementation)

> Consider vectorizing the new 'trunc' function
> -
>
> Key: HIVE-15406
> URL: https://issues.apache.org/jira/browse/HIVE-15406
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Matt McCline
>Assignee: Laszlo Bodor
>Priority: Critical
> Attachments: HIVE-15406.01.patch, HIVE-15406.02.patch, 
> HIVE-15406.03.patch, HIVE-15406.04.patch, HIVE-15406.05.patch, 
> HIVE-15406.06.patch
>
>
> Rounding function 'trunc' added by HIVE-14582.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (HIVE-15406) Consider vectorizing the new 'trunc' function

2019-03-13 Thread Laszlo Bodor (JIRA)


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

Laszlo Bodor edited comment on HIVE-15406 at 3/13/19 2:38 PM:
--

[~kgyrtkirk]: oh, I'm not sure how that garbage made it's way to the 
patch...thanks!


was (Author: abstractdog):
[~kgyrtkirk]: oh, I'm not sure how that garbage made it's way to the patch...

> Consider vectorizing the new 'trunc' function
> -
>
> Key: HIVE-15406
> URL: https://issues.apache.org/jira/browse/HIVE-15406
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Matt McCline
>Assignee: Laszlo Bodor
>Priority: Critical
> Attachments: HIVE-15406.01.patch, HIVE-15406.02.patch, 
> HIVE-15406.03.patch, HIVE-15406.04.patch, HIVE-15406.05.patch
>
>
> Rounding function 'trunc' added by HIVE-14582.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)