Skip to content

[doc](struct) document subscript and element_at access for STRUCT type#3898

Open
csun5285 wants to merge 2 commits into
apache:masterfrom
csun5285:doc-struct-subscript-access
Open

[doc](struct) document subscript and element_at access for STRUCT type#3898
csun5285 wants to merge 2 commits into
apache:masterfrom
csun5285:doc-struct-subscript-access

Conversation

@csun5285
Copy link
Copy Markdown
Contributor

@csun5285 csun5285 commented Jun 3, 2026

Document that STRUCT fields can be accessed via the subscript operator and via
ELEMENT_AT, in addition to STRUCT_ELEMENT. These three are equivalent:

  • STRUCT_ELEMENT(s, k) / STRUCT_ELEMENT(s, 'field_name')
  • ELEMENT_AT(s, k) / ELEMENT_AT(s, 'field_name')
  • s[k] / s['field_name']

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1 or older (not covered by version/language sync gate)

Languages

  • Chinese
  • English
  • Japanese candidate translation needed

Docs Checklist

  • Checked by AI
  • Test Cases Built
  • Updated required version and language counterparts, or explained why not
  • If only one language changed, confirmed whether source/translation counterparts need sync

csun5285 and others added 2 commits June 2, 2026 18:05
Document that STRUCT fields can be accessed via the subscript operator
s[idx] / s['field_name'], equivalent to STRUCT_ELEMENT, aligning the docs
with apache/doris#64027.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend ELEMENT_AT docs to cover STRUCT, and note in the STRUCT type /
STRUCT_ELEMENT pages that element_at(s, ...) and s[...] are equivalent
to STRUCT_ELEMENT.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant