Skip to content

Conversation

askalt
Copy link

@askalt askalt commented Aug 18, 2025

This patch adds a physical placeholders support for ValuesExec.

  1. Planner keeps a flag that tells whether there are placeholders
    within a Values Logical Plan. This is known when SQL is turning
    into the logical plan.

  2. This flag is updated each time when expressions are mapped.

  3. On the physical planning stage this flag is passed into
    ValuesExec constructor.

  4. ValuesExec now has 2 work modes:
    (a) When an input batch is resolved. It do the same as before.
    (b) When it is known that an input batch contains placeholders.
    Then placeholders will be resolved in execution time.

This patch adds a physical placeholders support for `ValuesExec`.

1) Planner keeps a flag that tells whether there are placeholders
   within a Values Logical Plan. This is known when SQL is turning
   into the logical plan.

2) This flag is updated each time when expressions are mapped.

3) On the physical planning stage this flag is passed into
   `ValuesExec` constructor.

4) `ValuesExec` now has 2 work modes:
   (a) When an input batch is resolved. It do the same as before.
   (b) When it is known that an input batch contains placeholders.
       Then placeholders will be resolved in execution time.
Copy link

@rudlorenz rudlorenz left a comment

Choose a reason for hiding this comment

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

LGTM

@askalt askalt merged commit 939425a into release-42.0.0 Aug 19, 2025
45 of 46 checks passed
@askalt askalt deleted the askalt/values-exec-placeholders branch August 21, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants