Skip to content

Track remaining native SQL correctness, coverage and performance work #239

Open

Description

@liuyongvs

Original audit: 2026-10-21 against canonical main 3be5b078. This update reviews shipped source, coverage documentation and merged CI evidence; it does not claim a new runtime or benchmark run.

P1 queue refresh — 2026-11-02

Live issue-state review (updated 2026-11-02): the open P1 labels are #234, #237 and this tracking issue. That is two implementation tickets and one tracker. PR #583 shipped #577/#581/#582, and PR #575 shipped #584; all four DECIMAL correctness tickets are closed. The former P1 implementation items #248, #389, #425, #392 and #398 are closed and are no longer pending work. Their closure does not imply that every historical performance deficit disappeared; current coverage and measured limits belong in the linked operator/optimization documentation.

The P1 table below supersedes the historical seven-item queue. Other sections retain their dated audit scope and have not received a fresh whole-backlog or runtime review. P0 compatibility work in #569 outranks the P1 queue. No new test or benchmark execution is claimed by this refresh.

Progress and evidence boundary

The original body and historical comments referenced 56 distinct child issues: 42 are closed and 14 remain open at this review. Closed is an issue-state count, not 42 newly rerun regressions. Of the 14 open references, #110 is an older umbrella, and #166 now concerns residual qualification rather than wholesale split-distinct rejection. Six related follow-ups (#168, #389, #392, #394, #425, #437) are included below. The resulting list has 19 work/verification tickets plus the older #110 umbrella; do not count umbrellas twice.

Major shipped increments include:

Open PR #423 is not part of this main snapshot. It extends direct Rust collection evaluation. Existing main already admits many collection functions through the generated batch evaluator; an open optimization PR does not make those functions unsupported, nor does it establish that the performance follow-up #392 is complete.

Priority policy (maintainer update, 2026-10-21)

The implementation priorities below replace the earlier ordering. The maintainer has explicitly prioritized collection coverage/performance, remaining JVM function contracts and default-enabled UDF conversion performance. Updating MAP/MULTISET retained payloads and native pattern matching are deferred to the lowest tier and may remain on stock Flink.

Repository labels now distinguish four tiers:

Safe fallback remains a support restriction, not an enabled wrong-result defect. In particular, #437's correctness guards must remain in place while the native extension is deferred. Correctness-verified UDFs remain default-enabled under the accepted performance exception. Raising #248 prioritizes profiling and measured optimization; it does not establish an unmeasured speedup or approve an architectural rewrite.

P1: current implementation priorities

Two implementation tickets remain: collection and JVM-function coverage. Correctness bugs take precedence over coverage expansion; collection work retains its maintainer priority within coverage. Deliver bounded, independently verified increments. This tracker is not an additional missing feature.

Priority Issue Remaining work / current contract
P1 #234 Unverified collection CAST/TRY_CAST signatures and contexts; ARRAY/ROW/STRUCTURED COLLECT/ARRAY_AGG elements; broader representation boundaries across state, exchange, ordering and consumers. Scalar and MAP/MULTISET aggregate elements and documented standalone casts have shipped. ARRAY/ROW aggregate expansion requires preserving binary/generic and empty-array copy behavior through recovery. Deferred updating MAP/MULTISET payloads remain in #437.
P1 #237 Remaining JVM conversion/type and execution contracts: additional table/scalar bridges and nested/internal signatures; aggregate two-phase merge/reset, OVER and broader type/mode coverage. Scalar single-phase mini-batches (#579), direct concrete/custom scalar List results (#580), and verified scalar bridges nested through external ROW/MAP (#585) have shipped. Verified UDF subsets remain default-enabled under the accepted performance exception. All async feature work (including asynchronous state), lookup-join-related work, Python functions and MATCH_RECOGNIZE are out of scope for #237 for now; exclude them from its remaining work and completion estimates. Follow the issue and operator docs for exact admission gates.

Former P1 items #248 (JNI/Arrow boundary profiling), #389 (temporal scalar UDF conversion), #425 (exact/temporal table-function conversion), #392 (collection-expression performance) and #398 (shared scalar-UDF execution) are closed. Their old descriptions are historical evidence, not an active implementation queue. Collection coverage remains owned by #234; remaining JVM contracts remain owned by #237.

Historical slower measurements remain evidence, not fresh timing results or speedup claims. Use the repository's applicable release measurement boundaries and retain unfavorable comparisons.

P2: remaining common-type support and validation

Priority Issue Exact remaining scope / current protection
P2 #397 Preserve JSON-derived STRING UTF-16 identity across UNION and other intermediate operators. Final projections and fused scalar consumers work; the intermediate-boundary guard remains.
P2 #382 Retracting TWO_PHASE GROUP BY MIN/MAX and COUNT(DISTINCT) after updating Top-N. COUNT/AVG/SUM0/exact integer SUM already merge natively; unsupported merge layouts fall back.
P2 #99 Retracting window MIN/MAX and DISTINCT, plus updating processing-time/attached/session/legacy forms. Aligned event-time COUNT/SUM/AVG, shared exact SUM0 reductions and admitted FILTER forms are already supported.
P2 #102 Retracting hidden-rank OFFSET through upstream stateful mini-batches, preserving raw changelog order as well as final materialization.
P2 #104 Nullable variable rank bounds, changing update-fast bounds with positive TTL, and first-proposal ordering through upstream stateful bundles. Non-null admitted strategies and TTL-off update-fast support already exist.
P2 #91 SQL/JSON in non-Calc expression contexts and unsupported boundary leaves. Broad Calc selector grammar and verified MAP/MULTISET boundaries have shipped; intermediate STRING transport is owned by #397.
P2 #168 Expand authoritative per-invocation native/mixed/fallback classification across upstream SQL tests. Existing scopes are fail-closed; green uncontracted tests do not prove native execution. AS-wrapper fallback is no longer the current contract.
P2 #394 Reduce complete-job wide-overlap COUNT cascade cost, especially repeated persistent-state hydration/writes. Attached ONE_PHASE defaults were broadened in #442; this is a performance follow-up, not a default-admission blocker.

P3: residual type and verification work

Priority Issue Remaining scope
P3 #235 Legacy variable-length raw bytes under a declared BINARY(n) across another native operator or native columnar sink. Verified final/fused expressions and integer-index binary ELT are already admitted.
P3 #166 Enumerate any still-unverified split-distinct physical layouts and pin split-enabled checkpoint/recovery evidence. Core ONE_PHASE/TWO_PHASE SQL and unchanged upstream native contracts are shipped.

#110 remains a P3 historical September-audit umbrella. Its surviving children (#91/#99/#102/#104) and evidence expansion (#168) are listed here; Table API type-preserving AS is complete. It is not an independent missing function.

P4: lowest-priority optional extensions

Priority Issue Decision / retained behavior
P4 #437 Defer native updating MAP/MULTISET retained payloads in Top-N/LIMIT and joins. Keep current stock fallback and equality/retraction safeguards. The unique-key join clear-by-key subset already shipped; there is no near-term commitment to implement the broader map contract.
P4 #78 Native MATCH_RECOGNIZE and MATCH_ROWTIME/MATCH_PROCTIME operator context are out of scope for the time being. Keep stock Flink; do not implement this as part of #237.

These two issues remain open to preserve the known technical scope and evidence. Lowest priority is not a claim that they are implemented or a decision to permanently remove them from consideration.

Other existing performance/connector/release tickets, including #244, #247, #339, #350 and the Flink 1.18 production-release matrix, retain their own scopes. This update does not claim that the entire repository backlog is the table above.

Documented operator/expression restrictions requiring dedicated triage

These remain documented restrictions, not new executed reproductions in this update. Establish a host-valid minimal plan and authoritative fallback before creating implementation work.

  • P2 candidates: GroupTableAggregate / GroupWindowTableAggregate (different from ordinary UDAFs in Extend remaining JVM function types and execution contracts #237), and DeltaJoin while preserving FORCE-mode host validation.
  • P3 candidates: compute-path-relevant Values and legacy source/sink operators. All async feature work, lookup-join-related extensions and Python functions are out of scope for Extend remaining JVM function types and execution contracts #237 for the time being. Constant-only or scan-only plans are not proof of a missing compute function.
  • Standalone row-source DropUpdateBefore remains stock by default for its measured cost; filtering within an admitted native pipeline is already supported. It is a performance restriction, not a missing matcher.
  • Calc retains source-representation gates for certain STRING extrema/trim shapes, fallible expressions under AND/OR, and unsupported specialization/conversion signatures. Some expressions instead use generated row evaluation; do not globally classify all short-circuit consumers as fallback.
  • UNNEST has verified ARRAY/MAP/MULTISET paths. Unverified producer/consumer representations, boundary types and nullable ROW/ordinality shapes retain their documented gates. Host arity/code-generation failures are not new StreamFusion support bugs.
  • IncrementalGroupAggregate remains a documented deliberate non-goal, not an unchecked implementation task. Non-temporal Sort rejected by the streaming host is likewise not an acceleration gap.

Current evidence: Calc/types, GROUP BY, windows, Top-N, LIMIT, joins, UNNEST, unsupported operators, upstream execution contracts.

Historical audit and completion criteria

The PR #220 / 16ebb1e5 audit used released Flink 2.2.1/JDK17 and recorded 2,454 executions: 1,720 native successes, 551 fallback successes, 167 both-error records and 16 scan/constant plans. These include variants and are not unique functions, not the current main coverage denominator, and not additive with later suites. Both-error records do not prove matching exception semantics. The separate 111-JUnit control suite had overlapping decimal probes.

For every future admission change, compare values, resolved types, NULLs, failure/evaluation order, decimal scale/overflow and temporal precision/timezones against released Flink. Stateful work additionally needs raw changelog and materialization, watermarks/late data, cleanup, memory/RocksDB recovery and applicable rescaling evidence. Require positive native work for admitted paths and precise expected fallback for the rest. Update coverage docs and the owning ticket in the shipping change, and use the repository's applicable release performance gate without discarding unfavorable results. No implementation or fresh exhaustive regression is included in this status update.

Activity

  1. jordepic commented on Oct 4, 2026

    @jordepic
    Collaborator

    Progress update against canonical main at 0b38269e. This is a review of shipped source and documented coverage; no new test or benchmark run is claimed, and uncommitted workspace changes are excluded.

    Completed / existing foundation

    The audit fixture/coverage infrastructure is present. Dedicated follow-ups #224–#231 and #238 are closed after shipped increments; integer ARRAY_DISTINCT also shipped in #286. Broader GROUP BY distinct/string work has landed, but does not implement LISTAGG, JSON aggregates or collection-returning aggregates.

    Remaining work to enumerate

    Coverage/design references: docs/operators/calc-filter.md, docs/operators/group-by.md, docs/operators/unsupported.md.

    This issue should remain open for the remaining scope. Each shipping increment should update its coverage documentation and trim the pending checklist; new acceleration must satisfy repository parity and release-performance requirements.

  2. liuyongvs commented on Oct 10, 2026

    @liuyongvs
    CollaboratorAuthor

    Current-main runtime audit on bf9837c00c3513c88a3739dcefab549f037da3fb adds these independently reproduced follow-ups:

    Priority Finding Tracking
    P1 correctness Native Calc row evaluation rejects decimal overflow NULLs before host NOT NULL DROP enforcement #320
    P2 compatibility Native AVG(DECIMAL(38,38)) succeeds where released Flink fails planning; not an incorrect average claim #321
    P2 admission OVER value columns: DECIMAL, STRING and temporal types #322
    P2 admission Shared COUNT/AVG/SUM window reductions over BIGINT and DECIMAL #323
    P2 admission Window TIMESTAMP MIN/MAX and typed local/global partials #324
    P2 admission TIMESTAMP_LTZ window grids and session calendars outside the current timezone gates #325
    P2 admission, after core numeric/temporal coverage Window COUNT(DISTINCT) over BOOLEAN and TIME #326

    Existing #316 now also has actual STRING MIN/MAX execution evidence for TUMBLE/HOP/CUMULATE under ONE_PHASE/TWO_PHASE, with equal values, RowKinds and types through fallback.

    After #315 merged, rebased onto the latest main above and rebuilt the native core. The final audit executes 363 records on released Flink 2.2.1/JDK 17, the same 363 on Flink 2.2.1/JDK 11, and 21 representative records on Flink 1.18.1/JDK 17 (747 total). Across these combinations: 441 successful equal-result queries with native substitutions, 246 successful equal-result queries with explicit fallback and no native substitutions, eight matching-failure records excluded from successful parity, and 52 failure-outcome mismatches explained by #320 (45 records) and #321 (7 records). Counts include repeated JDK/type/timezone/frame/error variants, not distinct functions. Native substitutions somewhere in a plan do not prove that every expression or operator executes natively.

    The initial audit on 9724b9d contains 399 records. Fifteen initial program records where both executions failed (host-invalid signatures, custom-function prerequisites or expected host failures) are retained as baseline evidence and excluded from the latest-main rerun counts. They were never counted as successful native coverage.

    On both JDKs, existing IFNULL and JSON member-identity regressions pass all 15 tests. The seven new reproduction methods have five passing support-gap comparisons and two deliberately failing assertions exposing #320/#321 per JDK. No successful-query result-value/schema mismatch was found in the final batch. This does not establish coverage of every original SQL, external connector deployment, checkpoint/recovery scenario or supported native operator. No implementation is included.

  3. liuyongvs commented on Oct 10, 2026

    @liuyongvs
    CollaboratorAuthor

    Current-main audit at bf9837c00c3513c88a3739dcefab549f037da3fb, using canonical released Flink 2.2.1 dependencies:

    • Inventoried 326 SQL files and 1,414 statements. All 336 original INSERT computations were mapped to execution records; parameter variants produced 343 comparisons. Connector options were replaced with bounded diagnostic inputs/capture sinks while retaining computation, schema, constraints, computed columns and watermarks. This does not validate the original external connector deployments.
    • JDK 17 and JDK 11 have identical classifications: 175 successful comparisons with native substitutions, 29 successful explicit fallback comparisons, 110 successful plans without native operators, 28 both-error records, and one random-output contract comparison. The random-output case preserves deterministic columns, multiplicities, schema and the documented random-value range. Both-error records are excluded from successful parity.
    • The 307 streaming records were also compared with checkpoint-aware faulting sources under HashMap and RocksDB. Short-input stress variants repeat the same fixture rows to permit two completed checkpoint boundaries. Each backend has 276 deterministic successful records plus one random-contract record with actual fault injection and nonempty restored offsets, including all 175 records with native plans. These counts include repeated-input variants; the original short-input runs are retained separately.
    • Of 23 SQL files explicitly named for restore/failover/multistage coverage, 22 have successful actual-restore evidence. The remaining file contains an invalid released-host two-argument FIRST_VALUE signature and cannot establish native recovery parity.
    • Every one of the 30 concrete core Native*Operator classes has passed runtime-test evidence from the repository suites or targeted harnesses. This is a coverage ledger for specific contracts, not proof of every overload or recovery combination. NativeShare additionally has passing Paimon multi-sink/window/network tests and a direct fan-out snapshot/restore harness over BIGINT, STRING, DECIMAL and TIMESTAMP/LTZ values.

    No new deterministic output mismatch remains in the reviewed 343 computation records. This does not mean all known correctness issues are resolved: fresh focused repros still fail for #320 (overflow NULL rejected before sink NOT NULL DROP) and #321 (native succeeds where released-host DECIMAL(38,38) AVG planning fails).

    New dedicated trackers:

    Recovery evidence was also added to #318: released Paimon 1.0.0 still reproduces the deletion-vector split-commit failure, and released Paimon 2.0.0 loses final full-compaction changelog after recovery between APPEND and COMPACT. Default green Paimon module tests skip those opt-in diagnostic failure boundaries.

    Existing support gaps remain deduplicated into #104 (nullable rank bounds), #234 (collection expressions), #237 (JVM table/aggregate/nested functions), #322–#326 (basic-value OVER/window and LTZ variants), #99/#166 (remaining retracting/split-distinct window shapes), and #91 (SQL/JSON admission boundaries).

    Validation limits: real Kafka/Fluss broker, object-store and cloud-connector recovery were not established in this environment. Fluss integration setup reports no Docker runtime. Native substitutions alone are not per-operator runtime-work proof; that evidence comes from operator harness assertions and the repository recovery/execution-metric suites. The four ordinary core-suite environment/profile problems were isolated rather than reclassified as SQL engine bugs: stale optional native libraries, a stock Parquet INT96 timezone fixture, fast-throw exception-message settings, and a bench-profile zero-copy routing assertion.

  4. liuyongvs commented on Oct 10, 2026

    @liuyongvs
    CollaboratorAuthor

    Additional verification of the same commit bf9837c00c3513c88a3739dcefab549f037da3fb:

    • Main CI run 38058984219 has one failed Java job: Flink 1.18/JDK 17, 4,281 tests, one failure, no errors, 378 skips. The failure checks optional helpful NPE message text in the stock JSON_EXISTS outcome before examining native behavior. Dedicated tracker: CI: JSON_EXISTS failure-parity test assumes optional JDK 17 NPE message details #331.
    • Isolated Flink 1.18.1/JDK 17 stock/native probes preserve the NPE class, ROW_EVALUATION phase, zero output and native route. The original test passes with helpful messages. Disabling the optional JVM details reproduces the message assertion failure while the stable failure contract still passes; this control is not a claim about the actual CI JVM options.
    • The upstream Flink suite and Paimon 1.0 compatibility runs at this commit passed.
    • The successful image integration job provides separate real-service evidence: 29 FlussSqlTest cases pass, both Nexmark/rocks-backend smoke invocations pass, and six deployment image tests pass. These CI checks supplement the local Fluss setup blockage; they do not establish every broker/cloud failure-recovery combination.

    The newly published audit trackers are therefore #327–#331. Production fixes remain outside this audit; the main source/worktree is unchanged.

  5. liuyongvs commented on Oct 14, 2026

    @liuyongvs
    CollaboratorAuthor

    Fresh SQL/recovery audit on main ff63b9139bbe3331b040aa99ebe8fdea476256a1, using released Flink 2.2.1 and 1.18.1, JDK 17.

    The audit attempts 397 parameter-expanded SQL query variants in each profile. Reference and native-enabled environments run independently with bounded typed runtime inputs, resolved-type comparison and final materialized-multiset comparison. Original VALUES data is moved to runtime inputs where feasible; connector-fed queries use deterministic replacement fixtures. These counts are execution records, not distinct functions.

    Profile Native parity Correct fallback Scan-only / batch host Both failed Nondeterministic / object identity
    Flink 2.2.1 streaming 210 33 90 60 4
    Flink 1.18.1 streaming 208 33 90 62 4
    Flink 2.2.1 with original sink-schema controls 197 31 81 84 4
    Flink 1.18.1 with original sink-schema controls 195 31 81 86 4
    Flink 2.2.1 batch 0 0 333 60 4

    No confirmed engine value/type mismatch or native-only execution failure remains after reviewing these records. One raw batch error difference is the host's generated anonymous table counter: both environments reject CDC in batch mode before native planner installation with the same INSERT-only-source restriction. It is not an engine regression.

    New independently reproduced support gaps:

    Fresh runtime evidence is also posted on #234, #91, #104 and #237. The 33 successful streaming fallback variants map to these seven tickets rather than duplicate issues.

    Additional evidence and limits:

    • Twenty-one supplemental executions produce matching results/types; together they provide nonempty results for 18 initially empty query shapes. Five complex multi-table query shapes retain only empty-result coverage.
    • In a separate pure-main worktree, the selected existing SQL/recovery suite runs 3,398 tests: 3,393 pass, zero failures/errors, five version/property skips. The 60 persisted recovery profiles pass across memory/native RocksDB (52 native, six fallback, two host controls), with native consumed-row metrics and checkpoint/failure/restored-offset evidence. GROUP BY savepoint rescaling passes through parallelisms 1 -> 3 -> 2 on both backends.
    • Native corpus classification records substitutions in completed submitted jobs, not consumed-row metrics for every individual operator. Recovery metrics provide stronger evidence for the profiles they cover. Corpus comparison retains RowKinds but compares final materialized results; it does not require identical intermediate changelog scheduling.
    • Both-failed records are excluded from successful parity. They include released-host-invalid function signatures/modes, original function/fixture incompatibilities, expected negative inputs, and absent lookup/catalog/fault-framework prerequisites. They are not all native support defects.
    • Original external connector IO, codec files, transactional commits, combined statement-set topology and the original fault-injection framework are not executed by the replacement fixture/collector. The selected recovery suite is not every original connector recovery scenario or the full JVM/connector test suite.

    No implementation change is included in this audit. Prioritize the basic exact-numeric/string/temporal work before floating and nested-type expansion, and retain explicit fallback until each new route has semantic, recovery and performance evidence.

  6. liuyongvs commented on Oct 15, 2026

    @liuyongvs
    CollaboratorAuthor

    Fresh runtime audit on canonical main 35b54e57771f92de9dfc649d8800f797b907fbd2, using released Flink 2.2.1 and 1.18.1, JDK 17. The remote main SHA was checked again after both version runs and still matches this baseline. Debug native builds are used for correctness; no performance claim is made.

    New P1 correctness defect: #365. A runtime STRING/DECIMAL input followed by UNION ALL of an append-only branch and an updating GROUP BY branch silently returns incorrect final sums under default native batch coalescing. Stock Flink returns (a,6.00),(b,14.00) while native returns (a,8.00),(b,20.00). Both released Flink lines reproduce 10/10 default-setting comparisons, covering both UNION arm orders. Setting only the JVM property streamfusion.exchange.coalesceRows=1 restores native value/type parity in 10/10 controls per line. Ordinary SELECT collection and a typed result sink both reproduce the error. A larger multi-branch UNION/ROLLUP sink query also intermittently panics in native Arrow concat on 2.2.1; no 1.18 panic is claimed. The issue contains a generic four-row reproduction, likely cause, implementation direction and acceptance criteria.

    This supersedes the earlier audit's absence of a confirmed wrong-result finding. Passing fixed-corpus and repository tests below do not establish that #365 is resolved. The defect was exposed by additional nonempty runtime fixtures and sink-schema controls.

    Executed SQL coverage

    Inventoried 326 SQL resources and expanded them into 397 query variants. All 397 have unique execution records in each of the five profiles, with zero missing IDs. One resource is DDL only. Inputs are bounded typed runtime fixtures; stock-Flink and native-enabled environments execute independently. Comparison covers resolved schemas and final materialized changelog multisets. Raw RowKinds remain in the evidence; equal intermediate changelog scheduling is not required.

    Profile Native parity Correct fallback Scan-only / batch host Both failed Random/time contract review
    Flink 2.2.1 streaming 216 27 90 60 4
    Flink 2.2.1 with sink-schema controls 203 25 81 84 4
    Flink 2.2.1 batch 0 0 333 60 4
    Flink 1.18.1 streaming 214 27 90 62 4
    Flink 1.18.1 with sink-schema controls 201 25 81 86 4

    These five fixed profiles have no unexplained value/type/failure-outcome differences. Both-failed cases remain excluded from successful parity: they include released-host SQL/mode restrictions, expected negative-input failures and absent external-function, lookup/catalog or fault-framework prerequisites. The one raw batch error difference is only a generated anonymous-source counter in the same host INSERT-only-source planning rejection, before native installation.

    Supplementary execution includes parallelism 3, supported opt-in configurations, nonempty complex inputs, minimal public reproductions and repeated coalescer controls. There are 2,348 SQL comparison records in total, including repetitions, not unique functions. The 60 supplementary wrong-result records and three native-only concat failures are all retained under #365. Initially empty native query shapes now each have at least one nonempty native result comparison, without claiming exhaustive key/cardinality coverage. All 26 explicit random/time contract reviews pass; deterministic clock-order cases are compared exactly rather than exempted.

    New support issues and existing owners

    Priority Runtime-confirmed gap Tracking
    P1 Mixed append/update UNION coalescing corrupts DECIMAL aggregation; intermittent native concat failure #365
    P2 TIMESTAMP/TIMESTAMP_LTZ scalar-UDF arguments and results; correct fallback on both Flink lines, builtin-only controls native #364
    P2/P3 Unfiltered ROW_NUMBER ordered by ordinary numeric values on Flink 2.2; correct fallback, filtered Top-N control native #363
    P2/P3 UUID projection with the released CHAR(36) contract; correct fallback on both lines #362

    Flink 1.18 rejects #363's unfiltered ordinary-order query itself, so it is not a native support gap for that line. UUID is checked for schema/count/format/distinctness, not equality of independent random identifiers.

    Fresh generic runtime evidence was added to #232 (LISTAGG), #234 (CARDINALITY), #235 (isolated fixed BINARY scalar-UDF argument/result boundaries), #237 (grouped/OVER JVM aggregate functions) and #91 (intermediate JSON STRING grouping). Nullable variable rank bounds remain owned by #104. These remain deduplicated rather than receiving new issues for each corpus occurrence.

    The default-off implementations from #342 and #343 are present: attached ONE_PHASE has four passing native controls per Flink line when enabled; shared row-major scalar evaluation has two passing native controls per line, while its independent BINARY boundary still safely falls back. They must not be reported as missing implementations. All six floating aggregate variants from #344 now have native parity; that issue remains correctly closed.

    Selected repository SQL/recovery validation

    Selected Flink*SqlHarnessTest, portable SQL, recovery matrix, rescale, decimal recovery, recovery failure reproduction and columnar-shuffle suites:

    Flink line Passed Failed/errors Skipped
    2.2.1 3,660 0 5
    1.18.1 3,331 0 350

    Both Maven commands finish with BUILD SUCCESS. Skips are not counted as passes. Flink 2.2 has four version-gated temporal negative controls and one optional recovery-stress gate. Flink 1.18 has 349 released-host/version assumption skips plus that stress gate; 226 are retracting window cases that its planner does not accept, with the remainder covering absent functions and other released-host restrictions.

    Independently inspected persisted reports on each line establish 60 passing recovery/cleanup profiles: 56 native, two fallback and two host controls. All 56 native profiles have positive consumed-row metrics; 58 profiles retain restored offsets. Memory and RocksDB rescaling both pass through parallelisms 1 -> 3 -> 2 with positive native work and zero retained native handles, Arrow allocations and task reservations. All 37 portable cases pass per line. These are scoped recovery contracts, not recovery coverage for every SQL variant or connector.

    Limits and next priority

    This executes adapted computation SQL and sink-schema controls, not the original Java framework unchanged. The Java inventory contains 87 files and 304 test-annotation occurrences; those annotations are not reported as executed methods. Original connector IO, external catalog/lookup services, transactions, combined statement-set topology, inline file/Hive IO and the original fault/backend framework are not established by replacement fixtures. Native substitutions in completed jobs are not per-operator consumed-row proof; that stronger evidence comes from the recovery profiles where measured.

    No implementation change or PR is included. Prioritize #365 before new admission, then basic temporal/JVM function coverage before broader collection or floating-type work. Preserve fallback until the relevant semantic, recovery and release-performance contracts are verified.

  7. liuyongvs commented on Oct 16, 2026

    @liuyongvs
    CollaboratorAuthor

    Revalidated on main b170a474d5658330ed7e92e9b8bcc54117c8d287, released Flink 2.2.1 and JDK 11, using identical frozen bounded runtime inputs and typed result capture. Native execution is classified from nonzero operator input metrics separately from result equality. The build is debug and supplies no performance conclusions.

    Confirmed new work:

    Priority Work Issue
    P2 Preserve Flink's positive mini-batch-size validation when replacing an updating JOIN #380
    P2 Extend two-phase COUNT(DISTINCT) to DATE, TIME and ordinary TIMESTAMP values #381
    P2 Extend retracting ordinary local/global MIN/MAX and COUNT(DISTINCT) after updating Top-N #382
    P2 Extend JVM table functions beyond STRING/INT/BIGINT to verified exact and temporal types #379
    P2 Optimize single-phase attached-window aggregation so its current default fallback can be removed #378

    #380 is a confirmed invalid-configuration/error-behavior difference: stock Flink rejects unset/default -1 and zero mini-batch sizes while native JOIN execution succeeds. The valid size=5 control returns identical results. The other four items are safe fallback/admission gaps; their current outputs match Flink. The existing performance opt-in for attached windows is acknowledged in #378, rather than misreported as missing implementation.

    Additional fresh evidence was recorded on #376/#377 (legacy numeric/CHAR casts), #91 (intermediate JSON STRING across UNION), #234 (collection casts), #237 (JVM function coverage) and #248 (shared scalar UDF opt-in/default performance boundary). These do not need duplicate tickets.

    After replacing superseded attempts and retaining distinct recorded query configurations, 185 bounded SQL query/configuration pairs have equal results: 100 have observed native operator consumption, 21 use explicit fallback, and 64 are host-only/constant/batch executions. The native count proves some native work, not that every expression in the plan is native. Separately, 44 isolated type/overload/control pairs match, and two memory-backend checkpoint probes (BIGINT and DECIMAL) pass with repeated restoration of nonempty state. Those probes do not establish coverage of every recovery or rescaling scenario.

    The executed corpus includes a million-row exact-integer expression and a large duplicate-key JOIN, both with complete result comparison and observed native consumption. Updating aggregate results are compared by applying the complete retract changelog to the final logical table; UPDATE_BEFORE records are not discarded.

    No new confirmed deterministic wrong-result case remains in this reviewed set. Queries that both engines reject (including unsupported function signatures), invalid generated primary-key inputs, missing test adapters and incomplete comparisons are excluded from successful parity. This remains an executed subset of the SQL/operator space, not a claim of exhaustive coverage of all SQL, connectors or recovery deployments.

  8. liuyongvs commented on Oct 18, 2026

    @liuyongvs
    CollaboratorAuthor

    The intermediate JSON-derived STRING boundary listed in this tracker now has a dedicated P2 issue: #397.

    The isolated streaming UNION ALL query was executed on main 0a02ecb88f5b9e67f6c022375470ca899a0690c3 with released Flink 2.2.1/JDK 11 and release/mimalloc JNI. Both engines return (1,'a'), (2,'b'), (3,'c'), but the native-enabled run has zero substitutions and reports JSON string identity requires a final projection or a fused scalar consumer. The same final-projection control executes native Calc and matches.

    #397 contains the portable runtime SQL, observed plan boundary, semantic reason, implementation direction and acceptance criteria. It tracks the retained support gate and does not reopen #81. Shared stateful scalar-UDF default performance admission is now tracked separately in #398; the implementation already exists and remains default-off pending performance work.

  9. 6 remaining items

  10. liuyongvs commented on Oct 23, 2026

    @liuyongvs
    CollaboratorAuthor

    Current-main regression follow-up at 88c90a34ec9025cedc3d629f069b1c3e11ea496c. Four independently reproduced remaining items now have focused issues:

    The ten isolated type probes execute on both Flink 2.2.1 and 1.18.1/JDK 11, with a JDK 17/2.2.1 cross-check. Both lines also reproduce #462 with deterministic three-row input, actual native consumption and a separate passing final-table control. Matching logical materialization is not counted as raw changelog parity.

    Existing #234/#235/#237/#397 have fresh current-head routing evidence instead of duplicate reports. The four release complete-job performance samples in the new #248 comment do not reproduce a slowdown; they are bounded diagnostics and do not close the broader profiling backlog. Existing maintainer-prioritized P1 ordering and the deferred MAP/MULTISET/MATCH_RECOGNIZE scope are unchanged.

  11. liuyongvs commented on Oct 26, 2026

    @liuyongvs
    CollaboratorAuthor

    Released-Flink function native-implementation audit (2026-10-26)

    Checked canonical main 15e7031dbf087d392bcca881d5ae17a09eab330a against released Flink 2.2.1 and 1.18.1. Compared the published definition/operator catalogs with source and 448 representative runtime-input SQL shapes per version (896 planning records). Inspected actual encoded Calc evaluator bindings, not just NativeCalc labels. Completed 40 paired local runtime probes: 30 succeeded with matching rows/types; 10 are host failures/version-absent functions and are excluded.

    New native implementation follow-ups are grouped by shared semantics. These are support/optimization gaps, not newly demonstrated output mismatches or measured performance regressions. Existing compatible JVM coverage remains shipped; these issues do not reopen its historical fallback claims.

    Priority Issue Scope
    P1 #505 Replace remaining generated collection and constructor signatures with native kernels
    P1 #514 Implement Rust COLLECT and ARRAY_AGG state instead of the generated JVM aggregate handler
    P2 #491 Implement JVM-free exact numeric unary, rounding and mixed-type scalar paths
    P2 #492 Replace remaining scalar CAST/TRY_CAST JVM evaluators with compatible native kernels
    P2 #493 Support native BINARY/VARBINARY to STRING CAST for verified released-Flink semantics
    P2 #494 Implement Flink-compatible native Unicode casing and string classification
    P2 #495 Implement compatible native SQL matching and regular-expression function paths
    P2 #496 Implement a compatible pure-native PARSE_URL kernel
    P2 #497 Implement a compatible native PRINTF formatting path on Flink 2.2
    P2 #498 Implement native FROM_BASE64 and remaining fixed-BINARY TO_BASE64 signatures
    P2 #499 Extend native ENCODE/DECODE beyond runtime charset and current charset whitelist limits
    P2 #500 Support native SHA2 with runtime or NULL bit-length arguments
    P2 #501 Implement native SPLIT_INDEX integer-delimiter overload
    P2 #503 Extend pure-native temporal parsing, formatting, timezone conversion and casts
    P2 #504 Extend pure-native temporal extraction and calendar arithmetic signatures
    P2 #506 Replace remaining Calc SQL/JSON JVM evaluator signatures with compatible native kernels
    P2 #507 Support SQL TRIM with a runtime trim operand in native Calc
    P2 #508 Extend native STRING ordering and dynamic trim beyond unproven source representations
    P2 #511 Support native PERCENTILE aggregation on released Flink 2.2
    P2 #512 Support native LAG in time-ordered streaming OVER windows
    P3 #502 Implement native binary STARTSWITH and ENDSWITH overloads
    P3 #509 Support native PARSE_JSON and TRY_PARSE_JSON with VARIANT transport
    P3 #513 Implement exact native floating math paths currently delegated to the JVM
    P4 #510 Track native execution support for the Flink PRINT debug scalar function

    Existing owners remain: #234 for collection types/aggregate/representation admission, #235 for fixed-BINARY intermediate boundaries, #91 for non-Calc JSON, #397 for intermediate JSON STRING identity, #237 for remaining JVM function contracts and #78 at P4 for pattern matching. Keep #437 at P4; no priority increase or admission change is implied.

    Scope limits: this is a representative streaming signature audit, not every overload/context or performance benchmark. SOURCE_WATERMARK projection and direct DECIMAL FLOOR/CEIL host runtime failures are excluded. Stock-rejected streaming APPROX_COUNT_DISTINCT/CUME_DIST/PERCENT_RANK/NTILE/LEAD forms are excluded. Version-absent names are N/A. Provider-dependent ML_PREDICT/ML_EVALUATE/VECTOR_SEARCH were not runtime-qualified. #490 stays closed NOT_PLANNED.

    Several special/operator-syntax expressions retain bound JVM evaluators even when the summarized jvmFunctions list is empty; #168 has the exact evidence. No production implementation or PR is part of this audit.

  12. jaskaran27177 commented on Dec 1, 2026

    @jaskaran27177

    I'd like to take the Values part of the "Reproduce host-valid unsupported … shapes" checklist item.

    From a reproduction on main (c56ee9b): Values has no native operator, but it never forces a fallback. As an input-less leaf, it stays on Flink behind a row-to-Arrow transpose, like a source. The Join, Union, GROUP BY and Calc operators above it ran natively and matched stock Flink in all 12 shapes I tried, including keyed aggregation, mixed literal types, NULLs and empty VALUES.

    So I don't think a native Values path is needed. I opened #704, a small PR that corrects docs/operators/unsupported.md (it currently says such a query falls back entirely) and adds a parity test for these shapes. It stays a draft until local validation on both Flink lines passes. Let me know if you'd rather handle it differently.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions