Handle case when ignoreInvalidRows is null (#6420)

This commit is contained in:
Atul Mohan 2018-10-05 13:03:37 -05:00 committed by Jonathan Wei
parent c7ac8785a1
commit 868ebfaca0
2 changed files with 3 additions and 3 deletions

View File

@ -152,11 +152,11 @@ public class HadoopTuningConfig implements TuningConfig
this.allowedHadoopPrefix = allowedHadoopPrefix == null ? ImmutableList.of() : allowedHadoopPrefix;
this.ignoreInvalidRows = ignoreInvalidRows;
this.ignoreInvalidRows = ignoreInvalidRows == null ? false : ignoreInvalidRows;
if (maxParseExceptions != null) {
this.maxParseExceptions = maxParseExceptions;
} else {
if (ignoreInvalidRows == null || !ignoreInvalidRows) {
if (!this.ignoreInvalidRows) {
this.maxParseExceptions = 0;
} else {
this.maxParseExceptions = TuningConfig.DEFAULT_MAX_PARSE_EXCEPTIONS;

View File

@ -6,7 +6,7 @@
"parser": {
"type": "string",
"parseSpec": {
"type": "tsv",
"format": "tsv",
"timestampSpec": {
"column": "timestamp",
"format": "yyyyMMddHH"