Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

UDF fails when subexpression elimination is used in interpreted mode

Open
#803 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
scala, spark

Research direction

Start with the UdfTests."multiple two argument udf" case and trace how interpreted mode handles an identical child subexpression that cannot compile, such as ExpressionProxy. Review the targeted fix mentioned in #800 and the related Spark 3.4 change in SPARK-41991. Done means the interpreted UDF path no longer fails and the regression test passes.

Written by the indexing model from the issue text.

Description

As UDF expects compilation always this fails when a child cannot compile, such as ExpressionProxy.

If, in interpreted mode, a child is deemed an identical subexpression (as occurs in the UdfTests."multiple two argument udf" test) spark is able to swap the contents as an optimisation to reduce re-calculation.

In the case where the analyser deems compilation the correct approach this isn't an issue. Targeted fix as part of #800.

Known to occur on Databricks 11.3 and other lower runtimes, fixed as part of 3.4 in SPARK-41991 .

Dominant language
Scala
Stars
895
Forks
135
Avg merge
7h 38m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from typelevel/frameless

All issues in typelevel/frameless

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.