[ https://issues.apache.org/jira/browse/CARBONDATA-2833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571028#comment-16571028 ] xuchuanyin commented on CARBONDATA-2833: ---------------------------------------- steps in issue description cannot reproduce the problem, I've tried with another steps, but still cannot reproduce it: ``` test("test") { CarbonProperties.getInstance().addProperty("bad_records_logger_enable", "true") CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_BAD_RECORDS_ACTION, "FAIL") sql("CREATE DATABASE test1") sql("use test1") sql("DROP TABLE IF EXISTS ab") sql("CREATE TABLE ab (a integer, b string) stored by 'carbondata'") sql("CREATE DATAMAP dm ON TABLE ab using 'bloomfilter' DMPROPERTIES('index_columns'='a,b')") try { sql("insert into ab select 'berb', 'abc', 'ggg', '1'") } catch { case e : Exception => LOGGER.error(e) } LOGGER.error("XU second run") try { sql("insert into ab select 'berb', 'abc', 'ggg', '1'") } catch { case e : Exception => LOGGER.error(e) } sql("select * from ab").show(false) sql("DROP TABLE IF EXISTS ab") sql("DROP DATABASE IF EXISTS test1") sql("use default") CarbonProperties.getInstance().addProperty("bad_records_logger_enable", CarbonLoadOptionConstants.CARBON_OPTIONS_BAD_RECORDS_LOGGER_ENABLE_DEFAULT) CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_BAD_RECORDS_ACTION, "FAIL") } ``` The load statement complains about the bad_record error, no NPE is reported. > NPE when we do a insert over a insert failure operation > ------------------------------------------------------- > > Key: CARBONDATA-2833 > URL: https://issues.apache.org/jira/browse/CARBONDATA-2833 > Project: CarbonData > Issue Type: Bug > Reporter: Brijoo Bopanna > Priority: Major > > jdbc:hive2://10.18.5.188:23040/default> CREATE TABLE > 0: jdbc:hive2://10.18.5.188:23040/default> IF NOT EXISTS test_table( > 0: jdbc:hive2://10.18.5.188:23040/default> id string, > 0: jdbc:hive2://10.18.5.188:23040/default> name string, > 0: jdbc:hive2://10.18.5.188:23040/default> city string, > 0: jdbc:hive2://10.18.5.188:23040/default> age Int) > 0: jdbc:hive2://10.18.5.188:23040/default> STORED BY 'carbondata'; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (0.191 seconds) > 0: jdbc:hive2://10.18.5.188:23040/default> > 0: jdbc:hive2://10.18.5.188:23040/default> > 0: jdbc:hive2://10.18.5.188:23040/default> > 0: jdbc:hive2://10.18.5.188:23040/default> desc test_table > 0: jdbc:hive2://10.18.5.188:23040/default> ; > +-----------+------------+----------+--+ > | col_name | data_type | comment | > +-----------+------------+----------+--+ > | id | string | NULL | > | name | string | NULL | > | city | string | NULL | > | age | int | NULL | > +-----------+------------+----------+--+ > 4 rows selected (0.081 seconds) > 0: jdbc:hive2://10.18.5.188:23040/default> insert into ab select 'berb','abc','ggg','1'; > Error: java.lang.Exception: Data load failed due to bad record: The value with column name a and column data type INT is not a valid INT type.Please enable bad record logger to know the detail reason. (state=,code=0) > 0: jdbc:hive2://10.18.5.188:23040/default> insert into ab select 'berb','abc','ggg','1'; > *Error: java.lang.NullPointerException (state=,code=0)* > 0: jdbc:hive2://10.18.5.188:23040/default> insert into test_table select 'berb','abc','ggg',1; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (1.127 seconds) > 0: jdbc:hive2://10.18.5.188:23040/default> show tables > 0: jdbc:hive2://10.18.5.188:23040/default> ; > +-----------+-------------+--------------+--+ > | database | tableName | isTemporary | > +-----------+-------------+--------------+--+ > | praveen | a | false | > | praveen | ab | false | > | praveen | bbc | false | > | praveen | test_table | false | > +-----------+-------------+--------------+--+ > 4 rows selected (0.041 seconds) > 0: jdbc:hive2://10.18.5.188:23040/default> > 0: jdbc:hive2://10.18.5.188:23040/default> desc ab > 0: jdbc:hive2://10.18.5.188:23040/default> ; > +-----------+------------+----------+--+ > | col_name | data_type | comment | > +-----------+------------+----------+--+ > | a | int | NULL | > | b | string | NULL | > +-----------+------------+----------+--+ > 2 rows selected (0.074 seconds) -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
Free forum by Nabble | Edit this page |