Skip to content

Conversation

@bcallender
Copy link
Contributor

@bcallender bcallender commented Oct 4, 2025

Array Functions Organization

This PR reorganizes array expressions in the logical plan proto to improve maintainability:

  • Groups all array-related expressions together in the LogicalExpr message
  • Adds clear section headers and comments to guide future array function additions
  • Reserves field number ranges (170-189) specifically for array functions
  • Adds new array function message definitions in a dedicated section
  • Preserves existing field numbers for backward compatibility

The following array functions are now properly organized:

  • Construction: array, array_repeat
  • Introspection: array_length
  • Element access: array_contains, element_at, array_slice
  • Transformation: array_distinct, array_max, array_min, array_sort, array_reverse, array_remove, array_compact, flatten
  • Set operations: array_union, array_intersect, array_except, arrays_overlap

This organization makes it easier to find and understand array functions, while providing clear guidance for adding new array functions in the future, laying the ground work for the array operations we will be adding in further downstack PRs.

@bcallender bcallender changed the title refactor: reorganize array expressions in proto for LLM-friendly development refactor: reorganize array expressions in proto Oct 4, 2025
@bcallender bcallender force-pushed the feat/count-distinct branch from caf97b2 to dfd5fe4 Compare October 4, 2025 02:19
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from 020fc46 to d681ab9 Compare October 4, 2025 02:19
@bcallender bcallender marked this pull request as ready for review October 4, 2025 04:10
@bcallender bcallender force-pushed the feat/count-distinct branch from dfd5fe4 to ef6efac Compare October 6, 2025 17:17
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from d681ab9 to 0e249d8 Compare October 6, 2025 17:17
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from 0e249d8 to ca6ddf8 Compare October 13, 2025 17:24
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from ca6ddf8 to bfd20e7 Compare October 13, 2025 20:57
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch 2 times, most recently from 23fc3c7 to cabeaa3 Compare October 14, 2025 19:23
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from cabeaa3 to b0db1c3 Compare October 15, 2025 22:33
Copy link
Contributor

@YoungVor YoungVor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, since the array_* pr will test that this is all correct. Just had a few nits

@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from b0db1c3 to 16b4a71 Compare October 22, 2025 17:38
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from 16b4a71 to f3c48b9 Compare October 22, 2025 22:11
Base automatically changed from feat/count-distinct to main October 22, 2025 23:09
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from f3c48b9 to 18d41f8 Compare October 22, 2025 23:10
…lopment

- Group all array expressions together with inline documentation
- Add comments guiding future array function additions
- Preserve existing field numbers for backwards compatibility
- No functional changes, pure organization
@bcallender bcallender force-pushed the feat/array-agg-proto-organization branch from 18d41f8 to 60e8752 Compare November 3, 2025 18:41
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.

3 participants