Describe the bug
enable_leaf_expression_pushdown inlines a column's defining expression into each extracted get_field that references it, but performs no volatility check.
To Reproduce
Run this:
datafusion-cli -c "SELECT s, s['a'] AS field FROM (SELECT named_struct('a', random()) AS s FROM generate_series(1,3));"
Expected behavior
field equals s.a on every row.
Additional context
Setting enable_leaf_expression_pushdown = false avoids the bug (makes field equals s.a on every row).
Describe the bug
enable_leaf_expression_pushdowninlines a column's defining expression into each extractedget_fieldthat references it, but performs no volatility check.To Reproduce
Run this:
Expected behavior
fieldequalss.aon every row.Additional context
Setting
enable_leaf_expression_pushdown = falseavoids the bug (makesfieldequalss.aon every row).