Skip to content

Conversation

@raunaqmorarka
Copy link
Member

Description

This code became unused after removal of HashGenerationOptimizer

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes all remnants of pre-computed hash symbol handling from join planning and execution after the HashGenerationOptimizer was removed. Primary changes include eliminating hash‐related constructor parameters, fields, methods, and imports across plan copying, execution planning, code generation, and operator implementations.

  • Drop unused hash symbol arguments in plan copying and local execution planner.
  • Remove precomputed hash fields and constructor logic in JoinCompiler, SimplePagesHashStrategy, and related factories.
  • Strip hash‐block handling from JoinProbe, HashBuilderOperator, HashSemiJoinOperator, ChannelSet, and other join operators.
  • Update PagesIndex and index/operator factories to only use join channels (no hash channel).

Reviewed Changes

Copilot reviewed 108 out of 108 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/trino-main/src/main/java/io/trino/sql/planner/PlanCopier.java Remove left/right hash symbol params from join copy
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java Remove probe/index hash channel computation
core/trino-main/src/main/java/io/trino/sql/gen/JoinCompiler.java Drop hashChannelField and related constructor/method
core/trino-main/src/main/java/io/trino/operator/join/unspilled/JoinProbe.java Remove probeHashBlock and hash‐based cache logic
core/trino-main/src/main/java/io/trino/operator/join/unspilled/HashBuilderOperator.java Eliminate preComputedHashChannel usage
core/trino-main/src/main/java/io/trino/operator/join/LookupJoinOperatorFactory.java Remove probeHashChannel and PrecomputedHashGenerator
core/trino-main/src/main/java/io/trino/operator/join/JoinProbe.java Strip optional hash block from factory and probe
core/trino-main/src/main/java/io/trino/operator/join/HashBuilderOperator.java Remove preComputedHashChannel from operator constructors
core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshotBuilder.java Drop keyOutputHashChannel and its use
core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSourceFactory.java Remove keyOutputHashChannel field/ctor
core/trino-main/src/main/java/io/trino/operator/index/IndexLoader.java Remove optional hash channel parameter
core/trino-main/src/main/java/io/trino/operator/function/TableFunctionOperator.java Eliminate OptionalInt import and hash strategy overloads
core/trino-main/src/main/java/io/trino/operator/WindowOperator.java Remove OptionalInt import and hash strategy params
core/trino-main/src/main/java/io/trino/operator/StreamingAggregationOperator.java Strip OptionalInt import and strategy call
core/trino-main/src/main/java/io/trino/operator/SimplePagesHashStrategy.java Remove precomputedHashChannel logic
core/trino-main/src/main/java/io/trino/operator/SetBuilderOperator.java Drop hashChannel from factory and operator
core/trino-main/src/main/java/io/trino/operator/PagesIndex.java Simplify lookup/hash strategy method signatures
core/trino-main/src/main/java/io/trino/operator/OperatorFactories.java Remove probeHashChannel from join factories
core/trino-main/src/main/java/io/trino/operator/HashSemiJoinOperator.java Remove probeJoinHashChannel and related branches
core/trino-main/src/main/java/io/trino/operator/ChannelSet.java Eliminate hash‐block overload of addAll

@raunaqmorarka raunaqmorarka force-pushed the raunaq/clean-join branch 3 times, most recently from bd69795 to b082600 Compare June 13, 2025 05:45
This code became unused after removal of HashGenerationOptimizer
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skimmed. Looks legit.

@raunaqmorarka raunaqmorarka merged commit 6ec4194 into master Jun 14, 2025
99 of 102 checks passed
@raunaqmorarka raunaqmorarka deleted the raunaq/clean-join branch June 14, 2025 05:43
@github-actions github-actions bot added this to the 477 milestone Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants