Skip to content

[Subtask]: D26 [4.2-to-main] Resolve existing planner function ID divergence #33700

Backlog

Description

@XuPeng-SH

Parent Issue

#32278 (D26). Coordinate with D24 (#33558), which carries forward the released SQL compression functions.

Detail of Subtask

The main and 4.2-dev planner registries have diverged. Some function names have different IDs across the two branches, and some IDs name different functions. The plan codec packs the function ID and overload index into a single int64. Lookup uses both numbers to select the implementation. Identify which supported upgrade or restore paths can read a previously encoded identity and verify that each retains its original meaning. Overload encoding · Registry lookup

The snapshots below contain 10 shared numeric slots with different registry entries.

ID main 4.2-dev
562 UUID_V1 LOAD_TEXT
563 UUID_V4 ESQL_TVF_CONNECT
564 UUID_V6 ESQL_TVF_DISCONNECT
565 UUID_EXTRACT_VERSION SQL_TVF_CONNECT
566 UUID_EXTRACT_TIMESTAMP SQL_TVF_DISCONNECT
567 PERCENTILE_CONT LAST_KAFKA_MESSAGE_ID
568 PERCENTILE_DISC ENUM_DISPLAY_TO_INDEX
637 FK_IGNORE_CHECK FIRST_ROW
638 MO_IVF_EXACT_RANKABLE IVF_EXACT_PK_IN
639 NOT_NULL_ASSERT COMPRESS_V2

Six entries have the same name and a different ID (main / 4.2-dev): LOAD_TEXT (569 / 562), ESQL_TVF_CONNECT (572 / 563), ESQL_TVF_DISCONNECT (573 / 564), SQL_TVF_CONNECT (574 / 565), SQL_TVF_DISCONNECT (575 / 566), and LAST_KAFKA_MESSAGE_ID (576 / 567). UNCOMPRESS_V2 occupies 640 on 4.2-dev and has no function entry on main at these snapshots. main registry · main tail · 4.2-dev registry

Describe implementation you've considered

  • Inventory the IDs and overload order in the supported released binaries. Trace any persisted expressions, plans and archive formats that consume encoded identities. For each supported path, establish where binding happens and whether a source version is available when decoding.
  • Reuse an existing rebind or versioned decode boundary where needed. Preserve emitted identities and avoid renumbering released entries without a migration backed by the corresponding data format and release contract.
  • Add a release or CI check for new function IDs and overload changes on the two active lines. Keep existing conflicts visible so a new allocation cannot silently extend the set.
  • Validate the affected supported paths with data or archives produced by the official source release. Assert that the target resolves the intended function and overload and returns the expected SQL result. Include a restart where the path retains persisted state.

Additional information

The inventory compares the branch snapshots above and excludes the FUNCTION_END_NUMBER sentinel. Cross-version runtime impact still needs validation. #30833 covers its separate new JSON_SEARCH allocation, which originally reused slot 640.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions