You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Loop-variable references in properties the compiled plan is built from give wrong output #8749
Inside a loop block, a loop-variable reference (#8635, #8639) in a property that the compiler builds an operator's output schema or partitioning from gives wrong output or a misleading error.
Root cause: the compiler builds the schema and the partitioning when the workflow compiles, from the reference's placeholder. The loop state writes the variable's value into the operator's setting only later, when the loop runs, so the value never reaches them.
Before: Loop Start (a = "x") -> Projection (alias $a) -> Loop End
output column named "$a", null in every row
After: compile error naming the property: its value decides the plan before the loop runs
Operator and property
What happens today
Projection alias
a column literally named $a, null in every row
Projection drop option
the keep-mode schema, while the operator drops
Dictionary Matcher, Unnest String, Aggregate result attribute; File Scan From Input attribute
the output column stays literally $r
Sort Partitions domain min / max
the range partition stays 0 to 0
Hash Join and Interval Join keys, Type Casting attribute, Aggregate group-by keys, Sort Partitions attribute
a misleading error later in the run
The same holds for a running workflow's operator that is modified while it runs: its rebuilt executor never has the loop variables written into it.
How to reproduce?
On the #8639 branch: build Text Input -> Loop Start (a = "x") -> Projection (alias of a column set to $a) -> Loop End and run it. Loop End's result has a column named $a whose values are all null.
It looks like the issue description doesn't quite follow our template yet:
This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.
Activity
github-actions commentedon Sep 29, 2026
👋 Thanks for opening this issue, @aglinxinyuan!
It looks like the issue description doesn't quite follow our template yet:
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.
fix(amber): reject $i in settings the plan is built from (apache#8750)