Github user manishgupta88 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1819#discussion_r164342705 --- Diff: integration/spark-common-cluster-test/src/test/scala/org/apache/carbondata/cluster/sdv/generated/DataLoadingTestCase.scala --- @@ -745,6 +744,34 @@ class DataLoadingTestCase extends QueryTest with BeforeAndAfterAll { sql(s"""drop table uniqdata""").collect } + test("BadRecord_Dataload_026", Include) { + dropTable("sales") + sql( + """CREATE TABLE IF NOT EXISTS sales(ID BigInt, date Timestamp, country String, + actual_price Double, Quantity int, sold_price Decimal(19,2)) STORED BY 'carbondata'""") + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd") + intercept[Exception] { + sql(s"LOAD DATA local inpath '${ resourcesPath }/badrecords/datasample.csv' INTO TABLE sales OPTIONS ('bad_records_logger_enable'='true','bad_records_action'='fail', 'DELIMITER'=" + + " ',', 'QUOTECHAR'= '\"')") + } + checkAnswer(s"""select count(*) from sales""", + Seq(Row(0)), "BadRecord_Dataload_026") + sql("drop table sales") --- End diff -- use drop table if exists everywhere in your newly added test cases
---