Skip to content

Remove old Spark 3.5 shim sources#15037

Open
gerashegalov wants to merge 1 commit into
codex/unshim-stack-02u-shim-cleanup-334from
codex/unshim-stack-02v-shim-cleanup-35
Open

Remove old Spark 3.5 shim sources#15037
gerashegalov wants to merge 1 commit into
codex/unshim-stack-02u-shim-cleanup-334from
codex/unshim-stack-02v-shim-cleanup-35

Conversation

@gerashegalov

@gerashegalov gerashegalov commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Related to #14834.

Description

This PR is one reviewable layer in the unshim stack introduced by #15025. It removes old Spark 3.5 shim sources that are now provided by shared helpers or the new helper modules.

Stack context

Testing and validation notes

  • No standalone behavior change is intended in this layer. It is covered by the full-stack packaging/build validation described in Add default common unshim packaging flow #15025 and the existing tests for the affected subsystem.
  • The full split stack was verified to be tree-equivalent to the pre-split stack top.

Checklists

Documentation

  • Updated for new or modified user-facing features or behaviors
  • No user-facing change

Testing

  • Added or modified tests to cover new code paths
  • Covered by existing tests
    (Covered by the validation notes in the PR description.)
  • Not required

Performance

  • Tests ran and results are added in the PR description
  • Issue filed with a link in the PR description
  • Not required

@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from eb17bcf to 81c9244 Compare June 10, 2026 20:49
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch 2 times, most recently from 7da249c to f41eeda Compare June 10, 2026 21:13
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 23f59cd to 9a706ac Compare June 10, 2026 21:32
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from f41eeda to 3e22bb7 Compare June 10, 2026 21:32
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 9a706ac to e4f3ab7 Compare June 10, 2026 21:36
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 3e22bb7 to dd6902a Compare June 10, 2026 21:36
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from e4f3ab7 to cc57ebc Compare June 10, 2026 22:20
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch 2 times, most recently from 3f348a1 to c27f3a3 Compare June 10, 2026 22:37
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from cc57ebc to 92c28d1 Compare June 10, 2026 22:37
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from c27f3a3 to 9f8ea3d Compare June 10, 2026 22:41
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 92c28d1 to 0bcc39d Compare June 10, 2026 22:41
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 9f8ea3d to 7b24086 Compare June 10, 2026 22:46
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch 2 times, most recently from 78e3755 to a43841a Compare June 10, 2026 22:59
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 7b24086 to 207d6eb Compare June 10, 2026 22:59
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from a43841a to 721a940 Compare June 10, 2026 23:12
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 207d6eb to 517d325 Compare June 10, 2026 23:12
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 721a940 to d1cfd5c Compare June 10, 2026 23:15
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch 2 times, most recently from 95559eb to 6f205d5 Compare June 10, 2026 23:29
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch 2 times, most recently from 4d278cb to c06aa0a Compare June 10, 2026 23:33
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 6f205d5 to 916f019 Compare June 10, 2026 23:33
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from c06aa0a to 9780ace Compare June 10, 2026 23:48
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 916f019 to 4e38c2c Compare June 10, 2026 23:48
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch 2 times, most recently from f039201 to fa220fe Compare June 11, 2026 00:25
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 278ab3d to 4654034 Compare June 11, 2026 00:25
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from fa220fe to b99a61c Compare June 11, 2026 00:37
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch 2 times, most recently from 0089b56 to c546023 Compare June 11, 2026 00:51
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from b99a61c to b48ffdf Compare June 11, 2026 00:51
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from c546023 to a72346b Compare June 11, 2026 01:18
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from b48ffdf to 2dfb359 Compare June 11, 2026 01:18
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from a72346b to 873c175 Compare June 11, 2026 01:32
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 2dfb359 to 25ad0c1 Compare June 11, 2026 01:32
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 873c175 to 550ff06 Compare June 11, 2026 01:43
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 25ad0c1 to 3e2628f Compare June 11, 2026 01:43
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 550ff06 to 17f3131 Compare June 11, 2026 01:58
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 3e2628f to 021a80c Compare June 11, 2026 01:58
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 17f3131 to a735370 Compare June 11, 2026 02:26
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch 2 times, most recently from 0f6f59c to 7aae5ec Compare June 13, 2026 12:13
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from a735370 to 2feeaf8 Compare June 13, 2026 12:13
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02u-shim-cleanup-334 branch from 2feeaf8 to bb08a89 Compare June 13, 2026 12:20
@gerashegalov gerashegalov force-pushed the codex/unshim-stack-02v-shim-cleanup-35 branch from 7aae5ec to 9e83c67 Compare June 13, 2026 12:20
@gerashegalov gerashegalov marked this pull request as ready for review June 13, 2026 12:49
@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes Spark 3.5 shim source files from sql-plugin that have been migrated to the new sql-plugin-shims helper module as part of the broader unshim-stack refactor (#15025). Two shared shim files (LegacyBehaviorPolicyShim, NullOutputStreamShim) are updated to drop external library dependencies and align with the existing spark330 inline implementations.

  • Deletes SparkShimServiceProvider.scala for spark350–358 and spark350db143 from sql-plugin; identical copies now live in sql-plugin-shims.
  • Removes SequenceSizeExceededLimitErrorBuilder.scala from sql-plugin/spark350db143; the canonical copy is in sql-plugin-shims/spark350db143 with the same shim-json coverage.
  • Updates LegacyBehaviorPolicyShim and NullOutputStreamShim to use inline string literals / anonymous OutputStream instead of LegacyBehaviorPolicy enum and Apache Commons IO, matching the pre-existing spark330 pattern.

Confidence Score: 5/5

Safe to merge — all deleted files have verified counterparts in sql-plugin-shims with matching content, and the two in-place edits align spark350 with the pre-existing spark330 pattern.

Every SparkShimServiceProvider deleted from sql-plugin was confirmed present in sql-plugin-shims with identical logic. The SequenceSizeExceededLimitErrorBuilder has the same shim-json-lines version coverage in its new location. LegacyBehaviorPolicyShim and NullOutputStreamShim now use the same inline implementations that have been stable in spark330 for some time, removing external library references with no behavioral difference.

No files require special attention.

Important Files Changed

Filename Overview
sql-plugin/src/main/spark350/scala/com/nvidia/spark/rapids/shims/LegacyBehaviorPolicyShim.scala Replaces LegacyBehaviorPolicy enum references with inline string literals, aligning with the pre-existing spark330 implementation for binary deduplication.
sql-plugin/src/main/spark350/scala/com/nvidia/spark/rapids/shims/NullOutputStreamShim.scala Replaces Apache Commons IO NullOutputStream with an inline anonymous OutputStream no-op, matching the spark330 implementation and removing the external dependency.
sql-plugin/src/main/spark350/scala/com/nvidia/spark/rapids/shims/spark350/SparkShimServiceProvider.scala Deleted from sql-plugin; identical content now served by sql-plugin-shims/src/main/spark350.
sql-plugin/src/main/spark350db143/scala/com/nvidia/spark/rapids/shims/spark350db143/SparkShimServiceProvider.scala Deleted from sql-plugin; identical content (including DB 14.3 matchesVersion logic) now served by sql-plugin-shims/src/main/spark350db143.
sql-plugin/src/main/spark350db143/scala/org/apache/spark/sql/rapids/shims/SequenceSizeExceededLimitErrorBuilder.scala Deleted from sql-plugin; canonical copy with matching shim-json coverage lives in sql-plugin-shims/src/main/spark350db143.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (sql-plugin)"]
        A["spark350/SparkShimServiceProvider"]
        B["spark351/SparkShimServiceProvider"]
        C["spark352-358/SparkShimServiceProvider"]
        D["spark350db143/SparkShimServiceProvider"]
        E["spark350db143/SequenceSizeExceededLimitErrorBuilder"]
        F["spark350/LegacyBehaviorPolicyShim\n(uses LegacyBehaviorPolicy enum)"]
        G["spark350/NullOutputStreamShim\n(uses commons-io NullOutputStream)"]
    end

    subgraph After["After (sql-plugin-shims)"]
        H["spark350/SparkShimServiceProvider"]
        I["spark351/SparkShimServiceProvider"]
        J["spark352-358/SparkShimServiceProvider"]
        K["spark350db143/SparkShimServiceProvider"]
        L["spark350db143/SequenceSizeExceededLimitErrorBuilder"]
    end

    subgraph Updated["Updated in place (sql-plugin/spark350)"]
        M["LegacyBehaviorPolicyShim\n(inline string literals)"]
        N["NullOutputStreamShim\n(inline anonymous OutputStream)"]
    end

    A -->|moved| H
    B -->|moved| I
    C -->|moved| J
    D -->|moved| K
    E -->|moved| L
    F -->|aligned with spark330 pattern| M
    G -->|aligned with spark330 pattern| N
Loading

Reviews (1): Last reviewed commit: "Remove old Spark 3.5 shim sources" | Re-trigger Greptile

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.

2 participants