mirror of https://github.com/apache/druid.git
58a8a23243
* Avoid conversion to String in JsonReader, JsonNodeReader. These readers were running UTF-8 decode on the provided entity to convert it to a String, then parsing the String as JSON. The patch changes them to parse the provided entity's input stream directly. In order to preserve the nice error messages that include parse errors, the readers now need to open the entity again on the error path, to re-read the data. To make this possible, the InputEntity#open contract is tightened to require the ability to re-open entities, and existing InputEntity implementations are updated to allow re-opening. This patch also renames JsonLineReaderBenchmark to JsonInputFormatBenchmark, updates it to benchmark all three JSON readers, and adds a case that reads fields out of the parsed row (not just creates it). * Fixes for static analysis. * Implement intermediateRowAsString in JsonReader. * Enhanced JsonInputFormatBenchmark. Renames JsonLineReaderBenchmark to JsonInputFormatBenchmark, and enhances it to test various readers (JsonReader, JsonLineReader, JsonNodeReader) as well as to test with/without field discovery. |
||
---|---|---|
.. | ||
src/test | ||
assembly.xml | ||
pom.xml |