forked from NVIDIA/spark-rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Spark 3.1.0 shim build error in GpuHashJoin (NVIDIA#546)
Signed-off-by: Jason Lowe <jlowe@nvidia.com>
- Loading branch information
Showing
2 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...spark310/src/main/scala/org/apache/spark/sql/execution/joins/HashJoinWithoutCodegen.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2020, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.spark.sql.execution.joins | ||
|
||
import org.apache.spark.rdd.RDD | ||
import org.apache.spark.sql.catalyst.InternalRow | ||
import org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext | ||
|
||
/** | ||
* This trait is used to implement a hash join that does not support codegen. | ||
* It is in the org.apache.spark.sql.execution.joins package to access the | ||
* `HashedRelationInfo` class which is private to that package but needed by | ||
* any class implementing `HashJoin`. | ||
*/ | ||
trait HashJoinWithoutCodegen extends HashJoin { | ||
override def supportCodegen: Boolean = false | ||
|
||
override def inputRDDs(): Seq[RDD[InternalRow]] = { | ||
throw new UnsupportedOperationException("inputRDDs is used by codegen which we don't support") | ||
} | ||
|
||
protected override def prepareRelation(ctx: CodegenContext): HashedRelationInfo = { | ||
throw new UnsupportedOperationException( | ||
"prepareRelation is used by codegen which is not supported for this join") | ||
} | ||
} |