viirya commented on code in PR #60538:
URL: https://github.com/apache/spark/pull/60538#discussion_r4581450649
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
+ Set("HashAggregate")),
+ ("hash aggregate, row-based fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "false"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, vectorized fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, adaptive partial aggregation",
+ Seq(SQLConf.ADAPTIVE_PARTIAL_AGGREGATION_ENABLED.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate without grouping keys", Nil, () => l.agg(sum("v1"),
max("k1")),
+ Set("HashAggregate")),
+ ("distinct aggregate", Nil, () =>
l.groupBy("k1").agg(countDistinct("v1"), sum("v1")),
+ Set("HashAggregate")),
+ ("aggregate with a filter", Nil,
+ () => sql("SELECT k1, sum(v1) FILTER (WHERE v1 > 10) FROM l GROUP BY
k1"),
+ Set("HashAggregate")),
+ ("sort aggregate", sortAgg, () => l.groupBy("k1").agg(sum("v1"),
max("v1")),
+ Set("SortAggregate")),
+ ("sort aggregate without grouping keys", sortAgg, () =>
l.agg(sum("v1"), max("v1")),
+ Set("SortAggregate")))
+ val joinTypes =
+ Seq("inner", "left_outer", "right_outer", "full_outer", "left_semi",
"left_anti")
+ val smj = joinTypes.map { joinType =>
+ (s"sort merge join, $joinType", noBroadcast, join("SHUFFLE_MERGE",
joinType),
+ Set("Sort", "SortMergeJoin"))
+ } :+ ("sort merge join, existence", noBroadcast, () =>
sql(existenceJoin),
+ Set("SortMergeJoin"))
+ val shj = joinTypes.flatMap { joinType =>
+ Seq(false, true).filter(buildLeft => joinType match {
+ case "left_semi" | "left_anti" => !buildLeft
+ case _ => true
+ }).map { buildLeft =>
+ (s"shuffled hash join, $joinType, build ${if (buildLeft) "left" else
"right"}",
+ noBroadcast, join("SHUFFLE_HASH", joinType, buildLeft),
Set("ShuffledHashJoin"))
+ }
+ } :+ ("shuffled hash join, existence", forceShj, () =>
sql(existenceJoin),
+ Set("ShuffledHashJoin"))
+ val bhj = Seq(("inner", false), ("inner", true), ("left_outer", false),
+ ("right_outer", true), ("left_semi", false), ("left_anti",
false)).map {
+ case (joinType, buildLeft) =>
+ (s"broadcast hash join, $joinType, build ${if (buildLeft) "left"
else "right"}",
+ noBroadcast, join("BROADCAST", joinType, buildLeft),
Set("BroadcastHashJoin"))
+ } :+ ("broadcast hash join, existence", Nil, () => sql(existenceJoin),
+ Set("BroadcastHashJoin"))
+ val bnlj = Seq("inner", "left_outer", "left_semi", "left_anti").map {
joinType =>
+ (s"broadcast nested loop join, $joinType", noBroadcast,
+ () => l.join(broadcast(r), $"k1" < $"k2" || $"v1" === $"v2",
joinType),
+ Set("BroadcastNestedLoopJoin"))
+ }
+ val rangeJoin = Seq("inner", "left_outer", "left_semi").map { joinType =>
+ (s"broadcast range join, $joinType",
+ noBroadcast :+ (SQLConf.BROADCAST_RANGE_JOIN_ENABLED.key -> "true"),
+ () => l.join(broadcast(r), $"v1" >= $"k2" && $"v1" <= $"v2",
joinType),
+ Set("BroadcastRangeJoin"))
+ }
+ val asOfJoin = Seq(("as-of join", noBroadcast :+
+ (SQLConf.SORT_MERGE_AS_OF_JOIN_ENABLED.key -> "true"),
+ () => {
+ val right = r.withColumnRenamed("k2", "k1")
+ l.joinAsOf(right, l("v1"), right("v2"), usingColumns = Seq("k1"),
joinType = "inner",
+ tolerance = null, allowExactMatches = true, direction = "backward")
+ },
+ Set("SortMergeAsOfJoin")))
+ val others = Seq(
+ ("sort", Nil, () => l.orderBy($"v1".desc), Set("Sort")),
+ ("expand", Nil, () => l.rollup("k1").agg(sum("v1")), Set("Expand")),
+ ("generate", Nil, () => l.select($"k1", explode(array($"v1", $"v1" +
1))),
+ Set("Generate")),
+ ("window", Nil,
+ () => l.select($"k1",
rank().over(Window.partitionBy("k1").orderBy("v1"))),
+ Set("Sort")),
+ ("limit", Nil, () => l.limit(5).groupBy("k1").count(),
Set("GlobalLimit")),
+ ("sample", Nil, () => l.sample(0.5, 1L), Set("Sample")),
+ ("union", Nil, () =>
l.select("k1").union(r.select("k2")).groupBy("k1").count(),
+ Set("Union")),
+ ("objects", Nil, () => spark.range(10).as[Long].map(_ * 2).filter(_ >
3).toDF(),
+ Set("MapElements")),
+ ("scalar and IN subqueries", noBroadcast, () => sql(
Review Comment:
Thanks, you're right: the IN is rewritten into a left semi join, and the
main plan already has a `Project`. I renamed the case to `scalar subquery` and
changed it to `SELECT k1, (SELECT max(v2) FROM r WHERE v2 < 5) FROM l`. Its
target, `HashAggregate`, only exists in the subquery. I checked that the case
fails when `allPlanNodes` stops walking subqueries.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
+ Set("HashAggregate")),
+ ("hash aggregate, row-based fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "false"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, vectorized fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, adaptive partial aggregation",
+ Seq(SQLConf.ADAPTIVE_PARTIAL_AGGREGATION_ENABLED.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate without grouping keys", Nil, () => l.agg(sum("v1"),
max("k1")),
+ Set("HashAggregate")),
+ ("distinct aggregate", Nil, () =>
l.groupBy("k1").agg(countDistinct("v1"), sum("v1")),
+ Set("HashAggregate")),
+ ("aggregate with a filter", Nil,
+ () => sql("SELECT k1, sum(v1) FILTER (WHERE v1 > 10) FROM l GROUP BY
k1"),
+ Set("HashAggregate")),
+ ("sort aggregate", sortAgg, () => l.groupBy("k1").agg(sum("v1"),
max("v1")),
+ Set("SortAggregate")),
+ ("sort aggregate without grouping keys", sortAgg, () =>
l.agg(sum("v1"), max("v1")),
+ Set("SortAggregate")))
+ val joinTypes =
+ Seq("inner", "left_outer", "right_outer", "full_outer", "left_semi",
"left_anti")
+ val smj = joinTypes.map { joinType =>
+ (s"sort merge join, $joinType", noBroadcast, join("SHUFFLE_MERGE",
joinType),
+ Set("Sort", "SortMergeJoin"))
+ } :+ ("sort merge join, existence", noBroadcast, () =>
sql(existenceJoin),
+ Set("SortMergeJoin"))
+ val shj = joinTypes.flatMap { joinType =>
+ Seq(false, true).filter(buildLeft => joinType match {
+ case "left_semi" | "left_anti" => !buildLeft
+ case _ => true
+ }).map { buildLeft =>
+ (s"shuffled hash join, $joinType, build ${if (buildLeft) "left" else
"right"}",
+ noBroadcast, join("SHUFFLE_HASH", joinType, buildLeft),
Set("ShuffledHashJoin"))
+ }
+ } :+ ("shuffled hash join, existence", forceShj, () =>
sql(existenceJoin),
+ Set("ShuffledHashJoin"))
+ val bhj = Seq(("inner", false), ("inner", true), ("left_outer", false),
+ ("right_outer", true), ("left_semi", false), ("left_anti",
false)).map {
+ case (joinType, buildLeft) =>
+ (s"broadcast hash join, $joinType, build ${if (buildLeft) "left"
else "right"}",
+ noBroadcast, join("BROADCAST", joinType, buildLeft),
Set("BroadcastHashJoin"))
+ } :+ ("broadcast hash join, existence", Nil, () => sql(existenceJoin),
+ Set("BroadcastHashJoin"))
+ val bnlj = Seq("inner", "left_outer", "left_semi", "left_anti").map {
joinType =>
+ (s"broadcast nested loop join, $joinType", noBroadcast,
+ () => l.join(broadcast(r), $"k1" < $"k2" || $"v1" === $"v2",
joinType),
+ Set("BroadcastNestedLoopJoin"))
+ }
+ val rangeJoin = Seq("inner", "left_outer", "left_semi").map { joinType =>
+ (s"broadcast range join, $joinType",
+ noBroadcast :+ (SQLConf.BROADCAST_RANGE_JOIN_ENABLED.key -> "true"),
+ () => l.join(broadcast(r), $"v1" >= $"k2" && $"v1" <= $"v2",
joinType),
+ Set("BroadcastRangeJoin"))
+ }
+ val asOfJoin = Seq(("as-of join", noBroadcast :+
+ (SQLConf.SORT_MERGE_AS_OF_JOIN_ENABLED.key -> "true"),
+ () => {
+ val right = r.withColumnRenamed("k2", "k1")
+ l.joinAsOf(right, l("v1"), right("v2"), usingColumns = Seq("k1"),
joinType = "inner",
+ tolerance = null, allowExactMatches = true, direction = "backward")
+ },
+ Set("SortMergeAsOfJoin")))
+ val others = Seq(
+ ("sort", Nil, () => l.orderBy($"v1".desc), Set("Sort")),
+ ("expand", Nil, () => l.rollup("k1").agg(sum("v1")), Set("Expand")),
+ ("generate", Nil, () => l.select($"k1", explode(array($"v1", $"v1" +
1))),
+ Set("Generate")),
+ ("window", Nil,
+ () => l.select($"k1",
rank().over(Window.partitionBy("k1").orderBy("v1"))),
+ Set("Sort")),
+ ("limit", Nil, () => l.limit(5).groupBy("k1").count(),
Set("GlobalLimit")),
+ ("sample", Nil, () => l.sample(0.5, 1L), Set("Sample")),
+ ("union", Nil, () =>
l.select("k1").union(r.select("k2")).groupBy("k1").count(),
+ Set("Union")),
+ ("objects", Nil, () => spark.range(10).as[Long].map(_ * 2).filter(_ >
3).toDF(),
+ Set("MapElements")),
+ ("scalar and IN subqueries", noBroadcast, () => sql(
+ "SELECT k1, (SELECT max(v2) FROM r WHERE v2 < 5) FROM l " +
+ "WHERE k1 IN (SELECT k2 FROM r WHERE v2 > 3)"),
+ Set("Project")),
+ ("vectorized parquet scan", Nil, () => spark.table("p").where($"v1" >
3)
+ .groupBy("k1").count(), Set("ColumnarToRow")),
+ ("row-based parquet scan",
Seq(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false"),
+ () => spark.table("p").where($"v1" > 3).groupBy("k1").count(),
Set("Filter")),
+ ("cached table scan", Nil, () =>
spark.table("c").groupBy("k1").count(),
+ Set("HashAggregate", "Range")),
+ ("merge rows", Nil, () => {
+ val source = l.selectExpr("CAST(v1 AS INT) AS t", "CAST(k1 AS INT)
AS s")
+ val attrs = source.queryExecution.analyzed.output
+ classic.Dataset.ofRows(spark, MergeRows(
+ isSourceRowPresent = Literal.TrueLiteral,
+ isTargetRowPresent = Literal.TrueLiteral,
+ matchedInstructions = Seq(Keep(Update, Literal.TrueLiteral,
attrs)),
+ notMatchedInstructions = Nil,
+ notMatchedBySourceInstructions = Nil,
+ checkCardinality = false,
+ output = attrs.map(_.newInstance()),
+ child = source.queryExecution.analyzed))
+ }, Set("MergeRows")))
+ aggs ++ smj ++ shj ++ bhj ++ bnlj ++ rangeJoin ++ asOfJoin ++ others
+ }
+
+ withTempPath { dir =>
+ withTempView("l", "r", "p", "c") {
+ spark.range(0, 100, 1, 2).select(($"id" % 10).as("k1"), $"id".as("v1"))
+ .createOrReplaceTempView("l")
+ spark.range(0, 30, 1, 2).select(($"id" % 7).as("k2"), $"id".as("v2"))
+ .createOrReplaceTempView("r")
+ spark.table("l").write.parquet(dir.getCanonicalPath)
+ spark.read.parquet(dir.getCanonicalPath).createOrReplaceTempView("p")
+ // Not the plan of `l`, which the other queries would then read from
the cache.
+ val cached =
+ spark.range(0, 50, 1, 2).select(($"id" % 10).as("k1"),
$"id".as("v1")).cache()
+ cached.createOrReplaceTempView("c")
+ try {
+ for {
+ (name, confs, query, expectedNodes) <- cases
+ aqe <- Seq(false, true)
+ usePartitionEvaluator <- Seq(false, true)
+ } {
+ withSQLConf(confs ++ Seq(
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> aqe.toString,
+ SQLConf.USE_PARTITION_EVALUATOR.key ->
usePartitionEvaluator.toString): _*) {
+ val clue = s"$name, aqe=$aqe,
usePartitionEvaluator=$usePartitionEvaluator"
+ val df = query()
+ df.collect()
+ // The RDDs are cached by the plans, so these are the ones the
query ran.
+ val plan = df.queryExecution.executedPlan
+ val stages = allPlanNodes(plan).collect { case s:
WholeStageCodegenExec => s }
+ val generated = stages.flatMap(s =>
generatedNodes(s.child)).map(_.nodeName)
+ expectedNodes.foreach { expected =>
+ assert(generated.exists(_.startsWith(expected)),
Review Comment:
Good catch. It now compares exactly, after `stripSuffix("(skew=true)")`. The
sort merge join cases now check `Sort` for real, and the existence join case
also checks `Sort`.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
+ Set("HashAggregate")),
+ ("hash aggregate, row-based fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "false"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, vectorized fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, adaptive partial aggregation",
+ Seq(SQLConf.ADAPTIVE_PARTIAL_AGGREGATION_ENABLED.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate without grouping keys", Nil, () => l.agg(sum("v1"),
max("k1")),
+ Set("HashAggregate")),
+ ("distinct aggregate", Nil, () =>
l.groupBy("k1").agg(countDistinct("v1"), sum("v1")),
+ Set("HashAggregate")),
+ ("aggregate with a filter", Nil,
+ () => sql("SELECT k1, sum(v1) FILTER (WHERE v1 > 10) FROM l GROUP BY
k1"),
+ Set("HashAggregate")),
+ ("sort aggregate", sortAgg, () => l.groupBy("k1").agg(sum("v1"),
max("v1")),
+ Set("SortAggregate")),
+ ("sort aggregate without grouping keys", sortAgg, () =>
l.agg(sum("v1"), max("v1")),
+ Set("SortAggregate")))
+ val joinTypes =
+ Seq("inner", "left_outer", "right_outer", "full_outer", "left_semi",
"left_anti")
+ val smj = joinTypes.map { joinType =>
+ (s"sort merge join, $joinType", noBroadcast, join("SHUFFLE_MERGE",
joinType),
+ Set("Sort", "SortMergeJoin"))
+ } :+ ("sort merge join, existence", noBroadcast, () =>
sql(existenceJoin),
+ Set("SortMergeJoin"))
+ val shj = joinTypes.flatMap { joinType =>
+ Seq(false, true).filter(buildLeft => joinType match {
+ case "left_semi" | "left_anti" => !buildLeft
+ case _ => true
+ }).map { buildLeft =>
+ (s"shuffled hash join, $joinType, build ${if (buildLeft) "left" else
"right"}",
+ noBroadcast, join("SHUFFLE_HASH", joinType, buildLeft),
Set("ShuffledHashJoin"))
+ }
+ } :+ ("shuffled hash join, existence", forceShj, () =>
sql(existenceJoin),
+ Set("ShuffledHashJoin"))
+ val bhj = Seq(("inner", false), ("inner", true), ("left_outer", false),
+ ("right_outer", true), ("left_semi", false), ("left_anti",
false)).map {
+ case (joinType, buildLeft) =>
+ (s"broadcast hash join, $joinType, build ${if (buildLeft) "left"
else "right"}",
+ noBroadcast, join("BROADCAST", joinType, buildLeft),
Set("BroadcastHashJoin"))
+ } :+ ("broadcast hash join, existence", Nil, () => sql(existenceJoin),
+ Set("BroadcastHashJoin"))
+ val bnlj = Seq("inner", "left_outer", "left_semi", "left_anti").map {
joinType =>
+ (s"broadcast nested loop join, $joinType", noBroadcast,
+ () => l.join(broadcast(r), $"k1" < $"k2" || $"v1" === $"v2",
joinType),
+ Set("BroadcastNestedLoopJoin"))
+ }
+ val rangeJoin = Seq("inner", "left_outer", "left_semi").map { joinType =>
+ (s"broadcast range join, $joinType",
+ noBroadcast :+ (SQLConf.BROADCAST_RANGE_JOIN_ENABLED.key -> "true"),
+ () => l.join(broadcast(r), $"v1" >= $"k2" && $"v1" <= $"v2",
joinType),
+ Set("BroadcastRangeJoin"))
+ }
+ val asOfJoin = Seq(("as-of join", noBroadcast :+
+ (SQLConf.SORT_MERGE_AS_OF_JOIN_ENABLED.key -> "true"),
+ () => {
+ val right = r.withColumnRenamed("k2", "k1")
+ l.joinAsOf(right, l("v1"), right("v2"), usingColumns = Seq("k1"),
joinType = "inner",
+ tolerance = null, allowExactMatches = true, direction = "backward")
+ },
+ Set("SortMergeAsOfJoin")))
+ val others = Seq(
+ ("sort", Nil, () => l.orderBy($"v1".desc), Set("Sort")),
+ ("expand", Nil, () => l.rollup("k1").agg(sum("v1")), Set("Expand")),
+ ("generate", Nil, () => l.select($"k1", explode(array($"v1", $"v1" +
1))),
+ Set("Generate")),
+ ("window", Nil,
+ () => l.select($"k1",
rank().over(Window.partitionBy("k1").orderBy("v1"))),
+ Set("Sort")),
+ ("limit", Nil, () => l.limit(5).groupBy("k1").count(),
Set("GlobalLimit")),
+ ("sample", Nil, () => l.sample(0.5, 1L), Set("Sample")),
+ ("union", Nil, () =>
l.select("k1").union(r.select("k2")).groupBy("k1").count(),
+ Set("Union")),
+ ("objects", Nil, () => spark.range(10).as[Long].map(_ * 2).filter(_ >
3).toDF(),
+ Set("MapElements")),
+ ("scalar and IN subqueries", noBroadcast, () => sql(
+ "SELECT k1, (SELECT max(v2) FROM r WHERE v2 < 5) FROM l " +
+ "WHERE k1 IN (SELECT k2 FROM r WHERE v2 > 3)"),
+ Set("Project")),
+ ("vectorized parquet scan", Nil, () => spark.table("p").where($"v1" >
3)
+ .groupBy("k1").count(), Set("ColumnarToRow")),
+ ("row-based parquet scan",
Seq(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false"),
+ () => spark.table("p").where($"v1" > 3).groupBy("k1").count(),
Set("Filter")),
+ ("cached table scan", Nil, () =>
spark.table("c").groupBy("k1").count(),
+ Set("HashAggregate", "Range")),
+ ("merge rows", Nil, () => {
+ val source = l.selectExpr("CAST(v1 AS INT) AS t", "CAST(k1 AS INT)
AS s")
+ val attrs = source.queryExecution.analyzed.output
+ classic.Dataset.ofRows(spark, MergeRows(
+ isSourceRowPresent = Literal.TrueLiteral,
+ isTargetRowPresent = Literal.TrueLiteral,
+ matchedInstructions = Seq(Keep(Update, Literal.TrueLiteral,
attrs)),
+ notMatchedInstructions = Nil,
+ notMatchedBySourceInstructions = Nil,
+ checkCardinality = false,
+ output = attrs.map(_.newInstance()),
+ child = source.queryExecution.analyzed))
+ }, Set("MergeRows")))
+ aggs ++ smj ++ shj ++ bhj ++ bnlj ++ rangeJoin ++ asOfJoin ++ others
+ }
+
+ withTempPath { dir =>
+ withTempView("l", "r", "p", "c") {
+ spark.range(0, 100, 1, 2).select(($"id" % 10).as("k1"), $"id".as("v1"))
+ .createOrReplaceTempView("l")
+ spark.range(0, 30, 1, 2).select(($"id" % 7).as("k2"), $"id".as("v2"))
+ .createOrReplaceTempView("r")
+ spark.table("l").write.parquet(dir.getCanonicalPath)
+ spark.read.parquet(dir.getCanonicalPath).createOrReplaceTempView("p")
+ // Not the plan of `l`, which the other queries would then read from
the cache.
+ val cached =
+ spark.range(0, 50, 1, 2).select(($"id" % 10).as("k1"),
$"id".as("v1")).cache()
+ cached.createOrReplaceTempView("c")
+ try {
+ for {
+ (name, confs, query, expectedNodes) <- cases
+ aqe <- Seq(false, true)
Review Comment:
Done. When `aqe` is on, the test also sets `ADAPTIVE_EXECUTION_FORCE_APPLY`
and asserts that the executed plan is an `AdaptiveSparkPlanExec`.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
+ Set("HashAggregate")),
+ ("hash aggregate, row-based fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "false"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, vectorized fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, adaptive partial aggregation",
+ Seq(SQLConf.ADAPTIVE_PARTIAL_AGGREGATION_ENABLED.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate without grouping keys", Nil, () => l.agg(sum("v1"),
max("k1")),
+ Set("HashAggregate")),
+ ("distinct aggregate", Nil, () =>
l.groupBy("k1").agg(countDistinct("v1"), sum("v1")),
+ Set("HashAggregate")),
+ ("aggregate with a filter", Nil,
+ () => sql("SELECT k1, sum(v1) FILTER (WHERE v1 > 10) FROM l GROUP BY
k1"),
+ Set("HashAggregate")),
+ ("sort aggregate", sortAgg, () => l.groupBy("k1").agg(sum("v1"),
max("v1")),
+ Set("SortAggregate")),
+ ("sort aggregate without grouping keys", sortAgg, () =>
l.agg(sum("v1"), max("v1")),
+ Set("SortAggregate")))
+ val joinTypes =
+ Seq("inner", "left_outer", "right_outer", "full_outer", "left_semi",
"left_anti")
+ val smj = joinTypes.map { joinType =>
+ (s"sort merge join, $joinType", noBroadcast, join("SHUFFLE_MERGE",
joinType),
+ Set("Sort", "SortMergeJoin"))
+ } :+ ("sort merge join, existence", noBroadcast, () =>
sql(existenceJoin),
+ Set("SortMergeJoin"))
+ val shj = joinTypes.flatMap { joinType =>
+ Seq(false, true).filter(buildLeft => joinType match {
+ case "left_semi" | "left_anti" => !buildLeft
+ case _ => true
+ }).map { buildLeft =>
+ (s"shuffled hash join, $joinType, build ${if (buildLeft) "left" else
"right"}",
+ noBroadcast, join("SHUFFLE_HASH", joinType, buildLeft),
Set("ShuffledHashJoin"))
+ }
+ } :+ ("shuffled hash join, existence", forceShj, () =>
sql(existenceJoin),
+ Set("ShuffledHashJoin"))
+ val bhj = Seq(("inner", false), ("inner", true), ("left_outer", false),
+ ("right_outer", true), ("left_semi", false), ("left_anti",
false)).map {
+ case (joinType, buildLeft) =>
+ (s"broadcast hash join, $joinType, build ${if (buildLeft) "left"
else "right"}",
+ noBroadcast, join("BROADCAST", joinType, buildLeft),
Set("BroadcastHashJoin"))
+ } :+ ("broadcast hash join, existence", Nil, () => sql(existenceJoin),
+ Set("BroadcastHashJoin"))
+ val bnlj = Seq("inner", "left_outer", "left_semi", "left_anti").map {
joinType =>
+ (s"broadcast nested loop join, $joinType", noBroadcast,
+ () => l.join(broadcast(r), $"k1" < $"k2" || $"v1" === $"v2",
joinType),
+ Set("BroadcastNestedLoopJoin"))
+ }
+ val rangeJoin = Seq("inner", "left_outer", "left_semi").map { joinType =>
+ (s"broadcast range join, $joinType",
+ noBroadcast :+ (SQLConf.BROADCAST_RANGE_JOIN_ENABLED.key -> "true"),
+ () => l.join(broadcast(r), $"v1" >= $"k2" && $"v1" <= $"v2",
joinType),
+ Set("BroadcastRangeJoin"))
+ }
+ val asOfJoin = Seq(("as-of join", noBroadcast :+
+ (SQLConf.SORT_MERGE_AS_OF_JOIN_ENABLED.key -> "true"),
+ () => {
+ val right = r.withColumnRenamed("k2", "k1")
+ l.joinAsOf(right, l("v1"), right("v2"), usingColumns = Seq("k1"),
joinType = "inner",
+ tolerance = null, allowExactMatches = true, direction = "backward")
+ },
+ Set("SortMergeAsOfJoin")))
+ val others = Seq(
+ ("sort", Nil, () => l.orderBy($"v1".desc), Set("Sort")),
+ ("expand", Nil, () => l.rollup("k1").agg(sum("v1")), Set("Expand")),
+ ("generate", Nil, () => l.select($"k1", explode(array($"v1", $"v1" +
1))),
+ Set("Generate")),
+ ("window", Nil,
+ () => l.select($"k1",
rank().over(Window.partitionBy("k1").orderBy("v1"))),
+ Set("Sort")),
+ ("limit", Nil, () => l.limit(5).groupBy("k1").count(),
Set("GlobalLimit")),
+ ("sample", Nil, () => l.sample(0.5, 1L), Set("Sample")),
+ ("union", Nil, () =>
l.select("k1").union(r.select("k2")).groupBy("k1").count(),
+ Set("Union")),
+ ("objects", Nil, () => spark.range(10).as[Long].map(_ * 2).filter(_ >
3).toDF(),
+ Set("MapElements")),
+ ("scalar and IN subqueries", noBroadcast, () => sql(
+ "SELECT k1, (SELECT max(v2) FROM r WHERE v2 < 5) FROM l " +
+ "WHERE k1 IN (SELECT k2 FROM r WHERE v2 > 3)"),
+ Set("Project")),
+ ("vectorized parquet scan", Nil, () => spark.table("p").where($"v1" >
3)
+ .groupBy("k1").count(), Set("ColumnarToRow")),
+ ("row-based parquet scan",
Seq(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false"),
+ () => spark.table("p").where($"v1" > 3).groupBy("k1").count(),
Set("Filter")),
+ ("cached table scan", Nil, () =>
spark.table("c").groupBy("k1").count(),
+ Set("HashAggregate", "Range")),
+ ("merge rows", Nil, () => {
+ val source = l.selectExpr("CAST(v1 AS INT) AS t", "CAST(k1 AS INT)
AS s")
+ val attrs = source.queryExecution.analyzed.output
+ classic.Dataset.ofRows(spark, MergeRows(
+ isSourceRowPresent = Literal.TrueLiteral,
+ isTargetRowPresent = Literal.TrueLiteral,
+ matchedInstructions = Seq(Keep(Update, Literal.TrueLiteral,
attrs)),
+ notMatchedInstructions = Nil,
+ notMatchedBySourceInstructions = Nil,
+ checkCardinality = false,
+ output = attrs.map(_.newInstance()),
+ child = source.queryExecution.analyzed))
+ }, Set("MergeRows")))
+ aggs ++ smj ++ shj ++ bhj ++ bnlj ++ rangeJoin ++ asOfJoin ++ others
+ }
+
+ withTempPath { dir =>
+ withTempView("l", "r", "p", "c") {
+ spark.range(0, 100, 1, 2).select(($"id" % 10).as("k1"), $"id".as("v1"))
+ .createOrReplaceTempView("l")
+ spark.range(0, 30, 1, 2).select(($"id" % 7).as("k2"), $"id".as("v2"))
+ .createOrReplaceTempView("r")
+ spark.table("l").write.parquet(dir.getCanonicalPath)
+ spark.read.parquet(dir.getCanonicalPath).createOrReplaceTempView("p")
+ // Not the plan of `l`, which the other queries would then read from
the cache.
+ val cached =
Review Comment:
Done. The `cached table scan` query now caches its own plan under the
configs of each run, and `spark.catalog.clearCache()` runs after each one. Its
target `Range` only exists in the cached plan. I checked that the case fails
when `allPlanNodes` stops walking cached plans.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
Review Comment:
Right, thanks. The first case now sets `ENABLE_TWOLEVEL_AGG_MAP` to `false`
and is named `hash aggregate without a fast hash map`.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala:
##########
@@ -904,6 +907,179 @@ class WholeStageCodegenSuite extends SharedSparkSession
}
}
+ test("SPARK-61761: Whole-stage codegen stages do not serialize plan nodes
into tasks") {
+ // The RDD that a codegen stage adds on top of its input RDDs is
serialized into every task
+ // binary, so it must not hold a plan node (see `serializedPlanNodes`).
This checks every
+ // codegen stage of queries that cover the operators that generate code,
through adaptive query
+ // stages and subqueries.
+ val noBroadcast = Seq(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1")
+ val forceShj = noBroadcast :+ ("spark.sql.join.forceApplyShuffledHashJoin"
-> "true")
+ val sortAgg =
+ Seq(SQLConf.USE_HASH_AGG.key -> "false", SQLConf.USE_OBJECT_HASH_AGG.key
-> "false")
+ // (name, configs, the query, the names of nodes that must be generated,
by prefix)
+ def cases: Seq[(String, Seq[(String, String)], () => DataFrame,
Set[String])] = {
+ def l = spark.table("l")
+ def r = spark.table("r")
+ def join(strategy: String, joinType: String, buildLeft: Boolean =
false): () => DataFrame =
+ () => {
+ val cond = $"k1" === $"k2" && $"v1" =!= $"v2"
+ if (buildLeft) l.hint(strategy).join(r, cond, joinType)
+ else l.join(r.hint(strategy), cond, joinType)
+ }
+ val existenceJoin = "SELECT * FROM l WHERE EXISTS (SELECT 1 FROM r WHERE
k2 = k1) OR v1 < 3"
+ val aggs = Seq(
+ ("hash aggregate", Nil, () => l.groupBy("k1").agg(sum("v1"),
avg("v1")),
+ Set("HashAggregate")),
+ ("hash aggregate, row-based fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "false"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, vectorized fast hash map",
+ Seq(SQLConf.ENABLE_TWOLEVEL_AGG_MAP.key -> "true",
+ SQLConf.ENABLE_VECTORIZED_HASH_MAP.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate, adaptive partial aggregation",
+ Seq(SQLConf.ADAPTIVE_PARTIAL_AGGREGATION_ENABLED.key -> "true"),
+ () => l.groupBy("k1").agg(sum("v1")), Set("HashAggregate")),
+ ("hash aggregate without grouping keys", Nil, () => l.agg(sum("v1"),
max("k1")),
+ Set("HashAggregate")),
+ ("distinct aggregate", Nil, () =>
l.groupBy("k1").agg(countDistinct("v1"), sum("v1")),
+ Set("HashAggregate")),
+ ("aggregate with a filter", Nil,
+ () => sql("SELECT k1, sum(v1) FILTER (WHERE v1 > 10) FROM l GROUP BY
k1"),
+ Set("HashAggregate")),
+ ("sort aggregate", sortAgg, () => l.groupBy("k1").agg(sum("v1"),
max("v1")),
+ Set("SortAggregate")),
+ ("sort aggregate without grouping keys", sortAgg, () =>
l.agg(sum("v1"), max("v1")),
+ Set("SortAggregate")))
+ val joinTypes =
+ Seq("inner", "left_outer", "right_outer", "full_outer", "left_semi",
"left_anti")
+ val smj = joinTypes.map { joinType =>
+ (s"sort merge join, $joinType", noBroadcast, join("SHUFFLE_MERGE",
joinType),
+ Set("Sort", "SortMergeJoin"))
+ } :+ ("sort merge join, existence", noBroadcast, () =>
sql(existenceJoin),
+ Set("SortMergeJoin"))
+ val shj = joinTypes.flatMap { joinType =>
+ Seq(false, true).filter(buildLeft => joinType match {
+ case "left_semi" | "left_anti" => !buildLeft
+ case _ => true
+ }).map { buildLeft =>
+ (s"shuffled hash join, $joinType, build ${if (buildLeft) "left" else
"right"}",
+ noBroadcast, join("SHUFFLE_HASH", joinType, buildLeft),
Set("ShuffledHashJoin"))
+ }
+ } :+ ("shuffled hash join, existence", forceShj, () =>
sql(existenceJoin),
+ Set("ShuffledHashJoin"))
+ val bhj = Seq(("inner", false), ("inner", true), ("left_outer", false),
+ ("right_outer", true), ("left_semi", false), ("left_anti",
false)).map {
+ case (joinType, buildLeft) =>
+ (s"broadcast hash join, $joinType, build ${if (buildLeft) "left"
else "right"}",
+ noBroadcast, join("BROADCAST", joinType, buildLeft),
Set("BroadcastHashJoin"))
+ } :+ ("broadcast hash join, existence", Nil, () => sql(existenceJoin),
+ Set("BroadcastHashJoin"))
+ val bnlj = Seq("inner", "left_outer", "left_semi", "left_anti").map {
joinType =>
+ (s"broadcast nested loop join, $joinType", noBroadcast,
+ () => l.join(broadcast(r), $"k1" < $"k2" || $"v1" === $"v2",
joinType),
+ Set("BroadcastNestedLoopJoin"))
+ }
+ val rangeJoin = Seq("inner", "left_outer", "left_semi").map { joinType =>
+ (s"broadcast range join, $joinType",
+ noBroadcast :+ (SQLConf.BROADCAST_RANGE_JOIN_ENABLED.key -> "true"),
+ () => l.join(broadcast(r), $"v1" >= $"k2" && $"v1" <= $"v2",
joinType),
+ Set("BroadcastRangeJoin"))
+ }
+ val asOfJoin = Seq(("as-of join", noBroadcast :+
+ (SQLConf.SORT_MERGE_AS_OF_JOIN_ENABLED.key -> "true"),
+ () => {
+ val right = r.withColumnRenamed("k2", "k1")
+ l.joinAsOf(right, l("v1"), right("v2"), usingColumns = Seq("k1"),
joinType = "inner",
+ tolerance = null, allowExactMatches = true, direction = "backward")
+ },
+ Set("SortMergeAsOfJoin")))
+ val others = Seq(
+ ("sort", Nil, () => l.orderBy($"v1".desc), Set("Sort")),
+ ("expand", Nil, () => l.rollup("k1").agg(sum("v1")), Set("Expand")),
+ ("generate", Nil, () => l.select($"k1", explode(array($"v1", $"v1" +
1))),
+ Set("Generate")),
+ ("window", Nil,
+ () => l.select($"k1",
rank().over(Window.partitionBy("k1").orderBy("v1"))),
+ Set("Sort")),
+ ("limit", Nil, () => l.limit(5).groupBy("k1").count(),
Set("GlobalLimit")),
+ ("sample", Nil, () => l.sample(0.5, 1L), Set("Sample")),
+ ("union", Nil, () =>
l.select("k1").union(r.select("k2")).groupBy("k1").count(),
+ Set("Union")),
+ ("objects", Nil, () => spark.range(10).as[Long].map(_ * 2).filter(_ >
3).toDF(),
+ Set("MapElements")),
+ ("scalar and IN subqueries", noBroadcast, () => sql(
+ "SELECT k1, (SELECT max(v2) FROM r WHERE v2 < 5) FROM l " +
+ "WHERE k1 IN (SELECT k2 FROM r WHERE v2 > 3)"),
+ Set("Project")),
+ ("vectorized parquet scan", Nil, () => spark.table("p").where($"v1" >
3)
+ .groupBy("k1").count(), Set("ColumnarToRow")),
+ ("row-based parquet scan",
Seq(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false"),
Review Comment:
Dropped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]