[ 
https://issues.apache.org/jira/browse/HIVE-21641?focusedWorklogId=230676&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-230676
 ]

ASF GitHub Bot logged work on HIVE-21641:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Apr/19 12:36
            Start Date: 22/Apr/19 12:36
    Worklog Time Spent: 10m 
      Work Description: ShubhamChaurasia commented on pull request #601: 
HIVE-21641: Llap external client returns decimal precision bug
URL: https://github.com/apache/hive/pull/601
 
 
   Llap external client returns decimal columns in different precision/scale as 
compared to beeline
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 230676)
            Time Spent: 10m
    Remaining Estimate: 0h

> Llap external client returns decimal columns in different precision/scale as 
> compared to beeline
> ------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-21641
>                 URL: https://issues.apache.org/jira/browse/HIVE-21641
>             Project: Hive
>          Issue Type: Bug
>          Components: llap
>            Reporter: Shubham Chaurasia
>            Assignee: Shubham Chaurasia
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Llap external client gives different precision/scale as compared to when the 
> query is executed beeline. Consider the following results:
> Query:
> {code} 
> select avg(ss_ext_sales_price) my_avg from store_sales;
> {code} 
> Result from Beeline
> {code} 
> +----------------------------+
> |           my_avg           |
> +----------------------------+
> | 37.8923531030581611189434  |
> +----------------------------+
> {code} 
> Result from Llap external client
> {code}
> +---------+
> |   my_avg|
> +---------+
> |37.892353|
> +---------+
> {code}
>  
> This is due to Driver(beeline path) calls 
> [analyzeInternal()|https://github.com/apache/hive/blob/rel/release-3.1.1/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L328]
>  for getting result set schema which initializes 
> [resultSchema|https://github.com/apache/hive/blob/rel/release-3.1.1/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L333]
>  after some more transformations as compared to llap-ext-client which calls 
> [genLogicalPlan()|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java#L561]
> Replacing {{genLogicalPlan()}} by {{analyze()}} resolves this.



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

Reply via email to