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

Rand() function is not working while updating data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.0-incubating
    • 1.2.0
    • data-query
    • None
    • Spark 1.6

    Description

      I am using update functionality with the rand(1) and rand() which return deterministic value or random value.

      But as I run query it gives error.

      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");

      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','MAXCOLUMNS'='12');

      Query-1 : Update uniqdata set (decimal_column1) = (rand());

      Query-2 : Update uniqdata set (decimal_column1) = (rand(1));

      Expected Result : Update column with random value.

      Actual Result :Error: java.lang.RuntimeException: Update operation failed. Job aborted due to stage failure: Task 0 in stage 3.0 failed 4 times, most recent failure: Lost task 0.3 in stage 3.0 (TID 205, 192.168.2.140): java.lang.ArrayIndexOutOfBoundsException: 1

      I have attached screen shot of log, executor log and CSV with this.

      Attachments

        1. executor_log
          11 kB
          Anurag Srivastava
        2. error_random_function.png
          91 kB
          Anurag Srivastava
        3. 2000_UniqData.csv
          416 kB
          Anurag Srivastava

        Activity

          People

            Ashwini.krishnakumar Ashwini K
            anuragknoldus Anurag Srivastava
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 5h 20m
                5h 20m