Skip to content

Consolidate the Scala "cannot fail" checks: arrays.cannotThrow and QueryPlanSerde.cannotFail #7585

Open

Description

@tlfua

What is the problem the feature request solves?

Comet's Scala side has more than one answer to "can evaluating this expression raise an error?":

Each copy has to be widened or tightened on its own, so a fix to one (for example a new cast that cannot fail, or a kernel found to raise where Spark does not) is easy to miss in the others.

Describe the potential solution

Keep one Scala notion of an expression that cannot fail, QueryPlanSerde.cannotFail, and have arrays.scala (and NativeLambdaSerde.mayRaise, if #7322 lands first) call it instead of keeping its own list.

This widens when array_append runs natively, so the change needs its own tests for the newly admitted item expressions, including ones that fail under ANSI.

Additional context

Raised in the review of #7457 :

Willingness to contribute

I can contribute a fix for this bug independently

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions