Skip to content

Optimize arrays only with a session; keep constructors lazy - #10793

Closed
robert3005 wants to merge 28 commits into
developfrom
rk/optimize-with-session
Closed

robert3005 wants to merge 28 commits into
developfrom
rk/optimize-with-session

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

The session-less optimize is removed and optimize(session) is the only entry point, so every rewrite sees the session's registered kernels.

Builtins such as cast and fill_null, and slice, filter, take and apply, no longer optimize the node they build. Instead:

  • execute_until runs optimize_recursive with the context's session before it starts, and again over the array execution produced, so canonical results do not keep lazy children such as a filtered validity;
  • single-step execution optimizes with the session instead of trying only the static reduce rules;
  • whenever a rule rewrites a node, the nodes the rule built are optimized too, while subtrees that already existed are left alone, so inverse rules (slice over get_item and get_item over slice) cannot loop.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants