Skip to content
Permalink
Browse files
DRILL-8229: Add Parameter to Skip Malformed Records to HTTP UDF (#2553)
* Add Parameter to Skip Malformed Records to HTTP UDF

* Addressed review comments
  • Loading branch information
cgivre committed May 19, 2022
1 parent cebf408 commit 8cef9dad56050e867e243baeed7494b8294ef9b7
Showing 1 changed file with 6 additions and 0 deletions.
@@ -65,6 +65,9 @@ public void setup() {
.allTextMode(options.getOption(org.apache.drill.exec.ExecConstants.JSON_ALL_TEXT_MODE).bool_val)
.enableNanInf(options.getOption(org.apache.drill.exec.ExecConstants.JSON_READER_NAN_INF_NUMBERS).bool_val)
.build();

jsonReader.setIgnoreJSONParseErrors(
options.getBoolean(org.apache.drill.exec.ExecConstants.JSON_READER_SKIP_INVALID_RECORDS_FLAG));
}

@Override
@@ -151,6 +154,9 @@ public void setup() {
.enableNanInf(options.getOption(org.apache.drill.exec.ExecConstants.JSON_READER_NAN_INF_NUMBERS).bool_val)
.build();

jsonReader.setIgnoreJSONParseErrors(
options.getBoolean(org.apache.drill.exec.ExecConstants.JSON_READER_SKIP_INVALID_RECORDS_FLAG));

String schemaPath = org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(rawInput.start, rawInput.end, rawInput.buffer);
// Get the plugin name and endpoint name
String[] parts = schemaPath.split("\\.");

0 comments on commit 8cef9da

Please sign in to comment.