Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove conf
  • Loading branch information
gatorsmile committed Jan 23, 2020
commit 2dd0e39e34040a7b4c60c23a34d2ec4db8d44b93
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ object ObjectSerializerPruning extends Rule[LogicalPlan] {
*/
object ReassignLambdaVariableID extends Rule[LogicalPlan] {
override def apply(plan: LogicalPlan): LogicalPlan = {
if (!SQLConf.get.getConf(SQLConf.OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID)) return plan

// The original LambdaVariable IDs are all positive. To avoid conflicts, the new IDs are all
// negative and starts from -1.
var newId = 0L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@ object SQLConf {
.stringConf
.createOptional

val OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID =
buildConf("spark.sql.optimizer.reassignLambdaVariableID.enabled")
.doc("When true, Spark optimizer reassigns per-query unique IDs to LambdaVariable, so that " +
"it's more likely to hit codegen cache.")
.booleanConf
.createWithDefault(true)

val DYNAMIC_PARTITION_PRUNING_ENABLED =
buildConf("spark.sql.optimizer.dynamicPartitionPruning.enabled")
.doc("When true, we will generate predicate for partition column when it's used as join key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,6 @@ class DatasetOptimizationSuite extends QueryTest with SharedSparkSession {
// codegen cache should work for Datasets of same type.
val count3 = getCodegenCount()
assert(count3 == count2)

withSQLConf(SQLConf.OPTIMIZER_REASSIGN_LAMBDA_VARIABLE_ID.key -> "false") {
// trigger codegen for another Dataset of same type
createDataset().collect()
// with the rule disabled, codegen happens again for encoder serializer and encoder
// deserializer
val count4 = getCodegenCount()
assert(count4 == (count3 + 2))
}
}

withClue("array type") {
Expand Down