Github user foryou2030 commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/122#discussion_r77336083 --- Diff: integration/spark/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala --- @@ -791,16 +819,23 @@ object GlobalDictionaryUtil extends Logging { if (requireDimension.nonEmpty) { val model = createDictionaryLoadModel(carbonLoadModel, table, requireDimension, hdfsLocation, dictfolderPath, false) + // check if dictionary files contains bad record + val accumulator = sqlContext.sparkContext.accumulator(0) // read local dictionary file, and group by key val allDictionaryRdd = readAllDictionaryFiles(sqlContext, headers, - requireColumnNames, allDictionaryPath) + requireColumnNames, allDictionaryPath, accumulator) // read exist dictionary and combine val inputRDD = new CarbonAllDictionaryCombineRDD(allDictionaryRdd, model) .partitionBy(new ColumnPartitioner(model.primDimensions.length)) // generate global dictionary files val statusList = new CarbonGlobalDictionaryGenerateRDD(inputRDD, model).collect() // check result status checkStatus(carbonLoadModel, sqlContext, model, statusList) + // if the dictionary contains wrong format record, throw ex + if (accumulator.value > 0) { + throw new DataLoadingException("Data Loading failure, the dictionary file " + --- End diff -- u r right. handled
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---