Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21641

Llap external client returns decimal columns in different precision/scale as compared to beeline

    XMLWordPrintableJSON

Details

    Description

      Llap external client gives different precision/scale as compared to when the query is executed beeline. Consider the following results:

      Query:

       
      select avg(ss_ext_sales_price) my_avg from store_sales;
      

       

      Result from Beeline

       
      +----------------------------+
      |           my_avg           |
      +----------------------------+
      | 37.8923531030581611189434  |
      +----------------------------+
      

       

      Result from Llap external client

      +---------+
      |   my_avg|
      +---------+
      |37.892353|
      +---------+
      

       
      This is due to Driver(beeline path) calls analyzeInternal() for getting result set schema which initializes resultSchema after some more transformations as compared to llap-ext-client which calls genLogicalPlan()

      Replacing genLogicalPlan() by analyze() resolves this.

      Attachments

        1. HIVE-21641.5.branch-3.patch
          4 kB
          Shubham Chaurasia
        2. HIVE-21641.4.patch
          4 kB
          Shubham Chaurasia
        3. HIVE-21641.3.patch
          4 kB
          Shubham Chaurasia
        4. HIVE-21641.2.patch
          4 kB
          Shubham Chaurasia
        5. HIVE-21641.1.patch
          0.6 kB
          Shubham Chaurasia

        Issue Links

          Activity

            People

              ShubhamChaurasia Shubham Chaurasia
              ShubhamChaurasia Shubham Chaurasia
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h