Ma77Ball opened a new issue, #5321:
URL: https://github.com/apache/texera/issues/5321

   JSONUtils.JSONToMap recurses once per JSON nesting level (result ++ 
JSONToMap(child, ...)). The traversal depth equals the structural depth of the 
input JSON, so a sufficiently deep object/array chain overflows the JVM call 
stack and throws StackOverflowError.
   
   This matters on the data-ingestion path: the JSON File Scan source operator 
(JSONLScanSourceOpExec) runs JSONToMap once per input record to turn each line 
into a tuple. A user-supplied .jsonl file with deeply nested records can 
therefore crash the Amber worker at the source operator, before any data flows 
downstream.
   
   Steps to reproduce:
   - Feed a deeply nested JSON value (an object/array nesting chain thousands 
of levels deep) through JSONToMap (e.g. via a JSON File Scan source).
   - Observe a StackOverflowError instead of the expected key->value map.
   
   Proposed fix:
   - Rewrite JSONToMap as an iterative traversal over a worklist (stack) of 
(JsonNode, parentName) pairs, so nesting depth lives on the heap rather than 
the call stack. The per-node logic and output are unchanged (the result is a 
Map, so visitation order is irrelevant).


-- 
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]

Reply via email to