JeremyXin opened a new issue, #12860:
URL: https://github.com/apache/seatunnel/issues/12860

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   ### Background
   
   In [PR #9760](https://github.com/apache/seatunnel/pull/9760), @Hisoka-X 
provided an example of the expected structured document output. In that 
example, `child_ids` is an array of element IDs, and an element without 
children has an empty array.
   
   The existing `MarkdownReadStrategy` output does not fully follow this 
structure: `child_ids` may be a comma-separated string or `null`, and 
heading-to-content relationships are not consistently reflected in `parent_id` 
and `child_ids`. This also leaves its `child_ids` type inconsistent with the 
output expected from `PdfReadStrategy`.
   
   ### Expected behavior
   
   Markdown and PDF readers should use the same `child_ids` field type and 
relationship semantics:
   
   - Emit `child_ids` as an array of strings.
   - Emit an empty array for elements without children.
   - Keep `parent_id` and `child_ids` consistent, including relationships 
between headings and their content.
   
   ### Motivation
   
   A consistent document schema lets downstream consumers handle Markdown and 
PDF rows in the same way and reduces the maintenance cost of format-specific 
handling.
   
   
   ### SeaTunnel Version
   
   2.3.13
   
   ### SeaTunnel Config
   
   ```conf
   none
   ```
   
   ### Running Command
   
   ```shell
   none
   ```
   
   ### Error Exception
   
   ```log
   none
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   <img width="3172" height="238" alt="Image" 
src="https://github.com/user-attachments/assets/ca912f37-9077-4851-af13-0ee77459379d";
 />
   
   The value corresponding to the position index of the "child_ids" field after 
parsing the Markdown file is null.
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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