zclllyybb commented on issue #3894:
URL: https://github.com/apache/doris-website/issues/3894#issuecomment-4608195980

   Breakwater-GitHub-Analysis-Slot: slot_bd8cae3faa79
   
   Initial analysis:
   
   This looks like a valid documentation issue, not a `STRUCT_ELEMENT` runtime 
bug.
   
   I checked the current website source for the four scoped pages:
   
   - 
`versioned_docs/version-3.x/sql-manual/sql-functions/scalar-functions/struct-functions/struct-element.md`
   - 
`versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/struct-functions/struct-element.md`
   - 
`i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/struct-functions/struct-element.md`
   - 
`i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/struct-functions/struct-element.md`
   
   All four still have the second example querying `test_struct` without a 
setup block, and all four still show positional struct output such as `{1, 2, 
3, 4, 5}`.
   
   I also checked the Doris code path for the mentioned release lines. In both 
2.1.11 and 3.1.4, struct JSON serialization writes object-style output with 
explicit field names, while `struct_element` resolves the requested field by 
name or 1-based position and returns the child column. That matches the 
reporter's observation that the function result is fine and the stale part is 
the displayed `struct_col` value in the docs.
   
   Missing information:
   
   - No product logs or profiles are needed for a docs-only fix.
   - For a PR, it would still be useful to include one exact SQL transcript 
from the target release line(s), because whitespace in the displayed struct 
string can depend on the client/output path.
   
   Suggested next step:
   
   - Update the EN and ZH `version-3.x` and `version-2.1` pages together.
   - Add a `CREATE TABLE test_struct (...)` and `INSERT` setup block before the 
second example.
   - Update the expected output to the current object-style struct rendering 
with quoted field names and JSON `null` for nested null fields, while keeping 
SQL `NULL` for the whole nullable struct row and the extracted result.
   - While touching the page, maintainers may also want to fix the existing 
`filed_location` / `filed_name` spelling in the syntax and parameter table, 
though that is separate from this issue.
   


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

Reply via email to