Skip to content

Document that a VALUES relation does not force fallback - #704

Draft
jaskaran27177 wants to merge 1 commit into
datafusion-contrib:mainfrom
jaskaran27177:docs/values-leaf-input
Draft

jaskaran27177 wants to merge 1 commit into
datafusion-contrib:mainfrom
jaskaran27177:docs/values-leaf-input

Conversation

@jaskaran27177

Copy link
Copy Markdown

Summary

docs/operators/unsupported.md says every listed operator makes "a query containing one fall back to Flink entirely". That isn't true for Values. The island check treats any input-less leaf like a row-wise source, so a constant VALUES relation stays on Flink behind a row-to-Arrow transpose, and the operators above it still run natively.

This PR corrects the docs and adds runtime SQL parity coverage that pins the behavior down. There are no runtime changes.

Refs #239 (the "Reproduce host-valid unsupported … Values … shapes" checklist item).

Changes

  • docs/operators/unsupported.md: the page intro and the Values row now separate interior operators (whole query falls back) from an input-less leaf such as Values (stays on Flink; operators above it run natively).
  • docs/operators/index.md: the all-or-nothing island rule names input-less leaves, including VALUES, alongside row-wise sources.
  • FlinkValuesLeafSqlHarnessTest: 12 streaming queries. For each one, the test asserts that:
    • the StreamPhysicalValues node is in the plan,
    • the query routes natively with no fallback reasons,
    • the changelog matches stock Flink, including row kinds.
Shape What it covers
join / union all VALUES next to a streaming input
group by over union all, group by over join VALUES rows through the native keyed exchange and stateful operators (+U/-U changelog)
calc directly over values, values only Flink keeps the Calc over Values; that Calc runs natively
widened decimal, null, string lengths, boolean/temporal literals Literal types through the transpose: DECIMAL(13, 3), NULL, VARCHAR(6) (no CHAR padding), BOOLEAN, DATE, TIMESTAMP(3)
union all / join with empty values VALUES filtered to zero rows

Validation

The original triage ran these query shapes on an earlier main (c56ee9b) with every query native and matching Flink. This commit's test on current main:

  • mvn -pl streamfusion-runtime -am test -Dtest=FlinkValuesLeafSqlHarnessTest: ⏳ in progress (draft until both lines pass)
  • mvn -Pflink-1.18 -pl streamfusion-runtime -am test -Dtest=FlinkValuesLeafSqlHarnessTest: ⏳ pending

Benchmarks

Not applicable: docs and test coverage only, with no change to planning or execution.

🤖 Generated with Claude Code

The unsupported-operator page said any operator without a native matcher
sends its whole query back to Flink. That holds for interior operators,
but the island check only requires the operators between the host edges
to be columnar: an input-less leaf is treated like a row-wise source. A
constant VALUES relation is such a leaf, so it stays on Flink behind a
row-to-Arrow transpose while the joins, unions, aggregates and Calcs
above it run natively.

Add SQL parity coverage for that boundary: VALUES joined with, unioned
with and aggregated alongside a streaming input; a Calc directly over
VALUES; widened DECIMAL, NULL, mixed-length string, BOOLEAN, DATE and
TIMESTAMP literals; and VALUES filtered to zero rows. Each query must
keep the Values node in its plan, route natively with no fallback
reasons, and match stock Flink's changelog.

No runtime behavior changes, so there is nothing to benchmark.

Refs datafusion-contrib#239

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant