Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-1003

Inaccurate result displays while using covar_pop and covar_samp aggregate functions in presto integration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • None
    • None
    • spark 2.1,presto 0.166

    Description

      Inaccurate result displays while using covar_pop and covar_samp aggregate functions in presto integration..

      Steps to reproduce :
      1. In CarbonData:
      a) Create table:
      CREATE TABLE uniqdata (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1 int) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ("TABLE_BLOCKSIZE"= "256 MB");
      b) Load data :
      LOAD DATA INPATH 'hdfs://localhost:54310/2000_UniqData.csv' into table uniqdata OPTIONS('DELIMITER'=',' , 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1');
      2. In presto
      Execute the query:
      1.) select covar_pop(BIGINT_COLUMN1,BIGINT_COLUMN1) as a from (select BIGINT_COLUMN1 from uniqdata order by BIGINT_COLUMN1) t

      Actual result:
      In CarbonData :
      "-----------------------+

      a

      -----------------------+

      6.158207330830757E20

      -----------------------+
      1 row selected (0.86 seconds)"

      In presto:
      " a
      -------------
      6.158207E20
      (1 row)

      Query 20170419_063811_00020_khh7w, FINISHED, 1 node
      Splits: 35 total, 35 done (100.00%)
      0:00 [2.01K rows, 1.97KB] [8.39K rows/s, 8.21KB/s]"

      2.)select covar_samp(BIGINT_COLUMN1,BIGINT_COLUMN1) as a from (select BIGINT_COLUMN1 from uniqdata order by BIGINT_COLUMN1) t

      Actual result:
      In CarbonData:
      "-----------------------+

      a

      -----------------------+

      6.161286434496173E20

      -----------------------+
      1 row selected (0.764 seconds)"

      In presto:
      " a
      -------------
      6.161286E20
      (1 row)

      Query 20170419_070158_00021_khh7w, FINISHED, 1 node
      Splits: 35 total, 35 done (100.00%)
      0:00 [2.01K rows, 1.97KB] [7.09K rows/s, 6.94KB/s]"

      Expected result :it should display the same result as showing in CarbonData.

      Attachments

        1. 2000_UniqData.csv
          367 kB
          Vandana Yadav

        Activity

          People

            Unassigned Unassigned
            Vandana7 Vandana Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: