Skip to content

Commit ffd435b

Browse files
gatorsmilecloud-fan
authored andcommitted
[SPARK-27871][SQL][FOLLOW-UP] Remove the conf spark.sql.optimizer.reassignLambdaVariableID.enabled
### What changes were proposed in this pull request? This PR is to remove the conf ### Why are the changes needed? This rule can be excluded using spark.sql.optimizer.excludedRules without an extra conf ### Does this PR introduce any user-facing change? Yes ### How was this patch tested? N/A Closes apache#27334 from gatorsmile/spark27871. Authored-by: Xiao Li <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
1 parent d0bf447 commit ffd435b

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/objects.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ object ObjectSerializerPruning extends Rule[LogicalPlan] {
235235
*/
236236
object ReassignLambdaVariableID extends Rule[LogicalPlan] {
237237
override def apply(plan: LogicalPlan): LogicalPlan = {
238-
if (!SQLConf.get.getConf(SQLConf.OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID)) return plan
239-
240238
// The original LambdaVariable IDs are all positive. To avoid conflicts, the new IDs are all
241239
// negative and starts from -1.
242240
var newId = 0L

sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,6 @@ object SQLConf {
234234
.stringConf
235235
.createOptional
236236

237-
val OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID =
238-
buildConf("spark.sql.optimizer.reassignLambdaVariableID.enabled")
239-
.doc("When true, Spark optimizer reassigns per-query unique IDs to LambdaVariable, so that " +
240-
"it's more likely to hit codegen cache.")
241-
.booleanConf
242-
.createWithDefault(true)
243-
244237
val DYNAMIC_PARTITION_PRUNING_ENABLED =
245238
buildConf("spark.sql.optimizer.dynamicPartitionPruning.enabled")
246239
.doc("When true, we will generate predicate for partition column when it's used as join key")

sql/core/src/test/scala/org/apache/spark/sql/DatasetOptimizationSuite.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,6 @@ class DatasetOptimizationSuite extends QueryTest with SharedSparkSession {
181181
// codegen cache should work for Datasets of same type.
182182
val count3 = getCodegenCount()
183183
assert(count3 == count2)
184-
185-
withSQLConf(SQLConf.OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID.key -> "false") {
186-
// trigger codegen for another Dataset of same type
187-
createDataset().collect()
188-
// with the rule disabled, codegen happens again for encoder serializer and encoder
189-
// deserializer
190-
val count4 = getCodegenCount()
191-
assert(count4 == (count3 + 2))
192-
}
193184
}
194185

195186
withClue("array type") {

0 commit comments

Comments
 (0)