Skip to content

refactor(isthmus): remove dead WindowRelFunctionConverter and de-duplicate call converters#1014

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:function-mapping-p0-debris
Open

refactor(isthmus): remove dead WindowRelFunctionConverter and de-duplicate call converters#1014
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:function-mapping-p0-debris

Conversation

@nielspardon

Copy link
Copy Markdown
Member

What

P0 (debris cleanup) of the Isthmus function-mapping refactor — behavior-preserving, no
functional change:

  1. Delete the dead WindowRelFunctionConverter. It was never instantiated or wired into
    any ConverterProvider, and it duplicated WindowFunctionConverter. The
    ConsistentPartitionWindow.WindowRelFunctionInvocation capability it targeted is produced
    only in :core (proto read / copy-on-write rewrite) and the :spark integration (its own
    converter) — both untouched — so no reachable capability is removed.
  2. De-duplicate the call-converter list. ConverterProvider.getCallConverters() now builds
    on CallConverters.defaults(typeConverter) (previously it re-listed the identical first
    eight converters) and then appends CREATE_SEARCH_CONV and the scalar function converter,
    as before. Order, instances, and the mutable-ArrayList return type are unchanged, so
    subclasses that mutate super.getCallConverters() (e.g. DynamicConverterProvider) keep
    working.
  3. Fix stale javadoc in SimpleExtensionToSqlOperator: it already handles window functions
    via toWindowSqlFunction, but the class and three ExtensionCollection overloads still said
    "scalar and aggregate … window functions are not yet implemented".

Why

First, lowest-risk step of the larger function-mapping redesign. See the plan in #1012 and the
umbrella epic #1013.

Verification

  • ./gradlew :isthmus:test :isthmus:pmdMain :isthmus:spotlessCheck :isthmus:javadoc — all pass.
  • Cross-module compile: :isthmus, :isthmus-cli, :examples:isthmus-api,
    :examples:substrait-spark all compile.
  • Behavior-equivalence of the call-converter change was reviewed against CallConverters.defaults()
    and the DynamicConverterProvider override.

Part of #1012 (P0); part of epic #1013.

🤖 Generated with AI

…icate call converters

WindowRelFunctionConverter was never instantiated or wired into any
ConverterProvider and duplicated WindowFunctionConverter; remove it. The
WindowRelFunctionInvocation capability it targeted is produced only in core
and the Spark integration, both untouched.

Have ConverterProvider.getCallConverters() build on CallConverters.defaults()
instead of re-listing the identical converters. The order, instances, and
mutability of the returned list are unchanged, so this is behavior-preserving.

Update SimpleExtensionToSqlOperator javadoc to reflect that window functions
are supported (the class already handles them).

No behavior change; verified with the isthmus test suite, PMD, spotless, and
javadoc. First, low-risk step of the function-mapping refactor.

Part of substrait-io#1012
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