github-actions[bot] commented on code in PR #69320:
URL: https://github.com/apache/doris/pull/69320#discussion_r4321731092
##########
be/src/format_v2/json/json_reader.cpp:
##########
@@ -750,7 +774,14 @@ Status JsonReader::_append_flat_array_jsonpath_rows(Block*
block, bool* is_empty
}
object_value = rooted_value.get_object();
}
- RETURN_IF_ERROR(_write_columns_by_jsonpath(&object_value, block,
&valid));
+ const size_t row_start = block->rows();
+ const auto status = _write_columns_by_jsonpath(&object_value, block,
&valid);
+ if (!status.ok()) {
+ if (!_request->reject_invalid_rows) {
+ return status;
+ }
+ RETURN_IF_ERROR(_handle_json_error(status, block, row_start,
is_empty_row));
Review Comment:
[P2] Count array elements rejected during JSON-root extraction
With `strip_outer_array=true`, `json_root=$.payload`, `jsonpaths=["$.k"]`,
and input `[{"other":1},{"payload":null},{"payload":{"k":2}}]`, the
missing/non-object root branches above advance before reaching this rejection
handler. They never increment `load_filtered_rows`, so V2 reports one loaded
row and zero filtered rows; V1 counts both rejected elements. Consequently
`max_filter_ratio=0` now succeeds instead of rejecting the load. This is
distinct from the existing empty-array thread: the array is nonempty and
individual elements fail root extraction. Route those branches through
per-element rejection accounting when `reject_invalid_rows` is enabled, and
cover the counts, valid sibling, and quality-gate failure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]