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

Group by on a combination of disitinct and non distinct aggregates can return serialization errors with map side aggregations.

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 0.3.0
    • Query Processor
    • None
    • Reviewed
    • Hide
      HIVE-222. Fixed Group by on a combination of disitinct and non distinct aggregates. (Ashish Thusoo via zshao)
      Show
      HIVE-222 . Fixed Group by on a combination of disitinct and non distinct aggregates. (Ashish Thusoo via zshao)

    Description

      For queries of the form (groupby2_map.q in the source)

      SELECT x, count(DISTINCT y), SUM FROM t GROUP BY x

      when map side aggregation is on

      hive.map.aggr=true (This is off by default)

      The following exception can occur:
      [junit] Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDeTypeDouble.serialize(DynamicSerDeTypeDouble.java:60)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDeFieldList.serialize(DynamicSerDeFieldList.java:235)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDeStructBase.serialize(DynamicSerDeStructBase.java:81)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe.serialize(DynamicSerDe.java:174)

      Attachments

        1. patch-222.txt
          5 kB
          Ashish Thusoo

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            athusoo Ashish Thusoo Assign to me
            athusoo Ashish Thusoo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment