[ https://issues.apache.org/jira/browse/CARBONDATA-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rahul Kumar reassigned CARBONDATA-772: -------------------------------------- Assignee: Rahul Kumar > Number format exception displays to user in spark 2.1. > ------------------------------------------------------ > > Key: CARBONDATA-772 > URL: https://issues.apache.org/jira/browse/CARBONDATA-772 > Project: CarbonData > Issue Type: Bug > Components: sql > Affects Versions: 1.0.0-incubating > Environment: Spark 2.1 > Reporter: Vinod Rohilla > Assignee: Rahul Kumar > Priority: Trivial > Attachments: 2000_UniqData.csv > > > Number format exception displays to user while execute the queries: > Steps to reproduces: > 1: Create table in Hive: > CREATE TABLE uniqdata4 (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) ROW FORMAT DELIMITED FIELDS TERMINATED BY ","; > 2:Load data in Hive: > LOAD DATA LOCAL INPATH '/home/vinod/Desktop/AllCSV/2000_UniqData.csv' into table uniqdata4; > 3:Select CUST_ID,CUST_NAME,DOB,BIGINT_COLUMN1,DECIMAL_COLUMN1,Double_COLUMN1,INTEGER_COLUMN1 from uniqdata4 where CUST_ID in ('10020','10030','10032','10035','10040','10060','',NULL,' ') or INTEGER_COLUMN1 in (1021,1031,1032,1033,'',NULL,' ') or DECIMAL_COLUMN1 in ('12345679921.1234000000','12345679931.1234000000','12345679936.1234000000','',NULL,' '); > Result: > +----------+------------------+------------------------+-----------------+-------------------------+----------------------+------------------+--+ > | CUST_ID | CUST_NAME | DOB | BIGINT_COLUMN1 | DECIMAL_COLUMN1 | Double_COLUMN1 | INTEGER_COLUMN1 | > +----------+------------------+------------------------+-----------------+-------------------------+----------------------+------------------+--+ > | 10020 | CUST_NAME_01020 | 1972-10-17 01:00:03.0 | 123372037874 | 12345679921.1234000000 | 1.12345674897976E10 | 1021 | > | 10030 | CUST_NAME_01030 | 1972-10-27 01:00:03.0 | 123372037884 | 12345679931.1234000000 | 1.12345674897976E10 | 1031 | > | 10031 | CUST_NAME_01031 | 1972-10-28 01:00:03.0 | 123372037885 | 12345679932.1234000000 | 1.12345674897976E10 | 1032 | > | 10032 | CUST_NAME_01032 | 1972-10-29 01:00:03.0 | 123372037886 | 12345679933.1234000000 | 1.12345674897976E10 | 1033 | > | 10035 | CUST_NAME_01035 | 1972-11-01 01:00:03.0 | 123372037889 | 12345679936.1234000000 | 1.12345674897976E10 | 1036 | > | 10040 | CUST_NAME_01040 | 1972-11-06 01:00:03.0 | 123372037894 | 12345679941.1234000000 | 1.12345674897976E10 | 1041 | > | 10060 | CUST_NAME_01060 | 1972-11-26 01:00:03.0 | 123372037914 | 12345679961.1234000000 | 1.12345674897976E10 | 1061 | > +----------+------------------+------------------------+-----------------+-------------------------+----------------------+------------------+--+ > Create table in CarbonData : > 1: 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"); > 2:Load data in table > 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'); > 3: Execute Selet queries: > select CUST_ID,CUST_NAME,DOB,BIGINT_COLUMN1,DECIMAL_COLUMN1,Double_COLUMN1,INTEGER_COLUMN1 from uniqdata where CUST_ID in ('10020','10030','10032','10035','10040','10060','',NULL,' ') or INTEGER_COLUMN1 in (1021,1031,1032,1033,'',NULL,' ') or DECIMAL_COLUMN1 in ('12345679921.1234000000','12345679931.1234000000','12345679936.1234000000','',NULL,' '); > Result: > Error: org.apache.spark.SparkException: Job aborted due to stage failure: Task 2 in stage 27.0 failed 1 times, most recent failure: Lost task 2.0 in stage 27.0 (TID 44, localhost, executor driver): java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NumberFormatException > at org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator.updateScanner(AbstractDataBlockIterator.java:145) > at org.apache.carbondata.core.scan.processor.impl.DataBlockIteratorImpl.next(DataBlockIteratorImpl.java:52) > at org.apache.carbondata.core.scan.processor.impl.DataBlockIteratorImpl.next(DataBlockIteratorImpl.java:33) > at org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator.getBatchResult(DetailQueryResultIterator.java:52) > at org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator.next(DetailQueryResultIterator.java:42) > at org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator.next(DetailQueryResultIterator.java:31) > at org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator.<init>(ChunkRowIterator.java:41) > at org.apache.carbondata.hadoop.CarbonRecordReader.initialize(CarbonRecordReader.java:79) > at org.apache.carbondata.spark.rdd.CarbonScanRDD.compute(CarbonScanRDD.scala:202) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:287) > at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:287) > at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:287) > at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:287) > at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) > at org.apache.spark.scheduler.Task.run(Task.scala:99) > at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.util.concurrent.ExecutionException: java.lang.NumberFormatException > at java.util.concurrent.FutureTask.report(FutureTask.java:122) > at java.util.concurrent.FutureTask.get(FutureTask.java:192) > at org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator.getNextScannedResult(AbstractDataBlockIterator.java:155) > at org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator.updateScanner(AbstractDataBlockIterator.java:133) > ... 25 more > Caused by: java.lang.NumberFormatException > at java.math.BigDecimal.<init>(BigDecimal.java:596) > at java.math.BigDecimal.<init>(BigDecimal.java:383) > at java.math.BigDecimal.<init>(BigDecimal.java:806) > at org.apache.carbondata.core.scan.expression.ExpressionResult.getDecimal(ExpressionResult.java:313) > at org.apache.carbondata.core.scan.expression.conditional.InExpression.evaluate(InExpression.java:76) > at org.apache.carbondata.core.scan.filter.executer.RowLevelFilterExecuterImpl.applyFilter(RowLevelFilterExecuterImpl.java:122) > at org.apache.carbondata.core.scan.filter.executer.OrFilterExecuterImpl.applyFilter(OrFilterExecuterImpl.java:39) > at org.apache.carbondata.core.scan.scanner.impl.FilterScanner.fillScannedResult(FilterScanner.java:133) > at org.apache.carbondata.core.scan.scanner.impl.FilterScanner.scanBlocklet(FilterScanner.java:92) > at org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator$1.call(AbstractDataBlockIterator.java:198) > at org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator$1.call(AbstractDataBlockIterator.java:185) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > ... 3 more > Driver stacktrace: (state=,code=0) > Expected Result: correct result should be display in spark 2.1. -- This message was sent by Atlassian JIRA (v6.3.15#6346) |
Free forum by Nabble | Edit this page |