Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1989

Sum(expression): result not consistent with hive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v1.5.2
    • v2.4.0
    • None
    • None

    Description

      When do the following query,

      SELECT channel.name, sum(case when product.product_vendor <> '' then fact_product.quantity else 0 end)
      FROM fact_product_sales as fact_product
      join dim_product as product on fact_product.product_id = product.id
      join dim_channel as channel on fact_product.channel_id = channel.id
      GROUP BY channel.name
      -------------------------------------------------------------------
      The result by kylin:
      Buy Button 0
      Online Store 0
      -------------------------------------------------------------------
      The result by hive is shown in figure.

      Why is that?

      Attachments

        1. hive_result.png
          2 kB
          Le Van Ha
        2. kylin_result.png
          4 kB
          Le Van Ha

        Issue Links

          Activity

            People

              mahongbin Hongbin Ma
              halevanha Le Van Ha
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: