[CORE] ExpressionMappings rebuilds the expression map on every lookup
Maintainers usually reply within 3 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- scala, spark
- Domain
- performance
Research direction
Start in the Scala object ExpressionMappings (in the Gluten core module), reading expressionsMap and blacklistExpressionMap to see where the ~360 default signatures are merged with the backend's extraExpressionMappings and partitioned by spark.gluten.expression.blacklist. Trace the callers in expression conversion, aggregate/window lookup and validation to confirm the inputs only change on config or backend registration. Done means the merged map is cached and correctly invalidated, with a TPC-H planning run showing the repeated rebuilds gone.
Written by the indexing model from the issue text.
Description
ExpressionMappings.expressionsMap and blacklistExpressionMap rebuild the whole mapping on every call: they merge the ~360 default signatures with the backend's extraExpressionMappings, then partition the result by spark.gluten.expression.blacklist. One call takes about 21 µs. Expression conversion, aggregate and window function lookups and validation call it repeatedly, about 98 times when planning a TPC-H query, although the inputs almost never change.
The result can be reused until the blacklist or the backend's extra mappings change.
This issue was written with the assistance of AI (Claude Opus).
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 685
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 84
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/gluten
-
[CORE] Selecting a cost model the backend has no coster for fails with ClassNotFoundExceptionPossibly taken @LuciferYang claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
bug unit testing velox backend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/gluten#13463 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 3 days
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching lengthMay be free again A pull request for this issue was closed without being merged. Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rchillyard/TableParser#206 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
? - Needs Triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
NVIDIA/cudf-spark#17063 ·
Maintainers usually reply within 2 days
-
bug 🐞 User issue 🚨
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
valkey-io/valkey-glide#7813 · 2 comments ·
Maintainers usually reply within 1 day