Skip to content

spark: SparkExtension.COLLECTION has no main-source consumer left #1234

Description

@nielspardon

SparkExtension.COLLECTION — the standard extension collection merged with spark.yml — is public API with no consumer in spark/src/main at all. DialectGenerator was the last one, and #1133 rewires it to the collections the runtime converters actually bind against. The only remaining use in the repo is SubstraitPlanTestBase.scala:76, which passes it to ProtoRelConverter.

Worth deciding what it is for before it drifts further. The interesting part is that the merged collection is the right thing for ProtoRelConverter (a plan can legitimately reference spark.yml functions) and the wrong thing for anything that has to bind a call, since toAggregateFunction and toWindowFunction are built from the standard collection alone — the asymmetry #1133 exists to fix. So COLLECTION is not simply dead: it is the collection a reader wants, used only from test code, sitting next to per-kind function sequences that are what writers want.

Options, roughly: keep it and document which side it serves; move it to the test source set if nothing outside tests should be reading plans this way; or expose it from wherever the plan-reading entry point ends up living. Also worth checking whether downstream consumers reference it, since removing or moving it is a breaking change to a public Scala object.

Follow-up from review of #1133.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions