Skip to content

Commit

Permalink
move GlutenClickHouseTPCHColumnarShuffleParquetAQESuite to tpch package
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Jul 30, 2024
1 parent 331cb88 commit 3190bc9
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gluten.execution
package org.apache.gluten.execution.tpch

import org.apache.gluten.GlutenConfig
import org.apache.gluten.execution._
import org.apache.gluten.extension.GlutenPlan

import org.apache.spark.SparkConf
Expand Down Expand Up @@ -65,7 +66,8 @@ class GlutenClickHouseTPCHColumnarShuffleParquetAQESuite
assert(plans.size == 5)

assert(plans(4).metrics("numFiles").value === 1)
assert(plans(4).metrics("pruningTime").value === -1)
val pruningTimeValue = if (isSparkVersionGE("3.4")) 0 else -1
assert(plans(4).metrics("pruningTime").value === pruningTimeValue)
assert(plans(4).metrics("filesSize").value === 19230111)
assert(plans(4).metrics("numOutputRows").value === 600572)

Expand All @@ -80,8 +82,8 @@ class GlutenClickHouseTPCHColumnarShuffleParquetAQESuite
assert(plans(1).metrics("numOutputRows").value === 8)
assert(plans(1).metrics("outputVectors").value === 2)

assert(plans(0).metrics("numInputRows").value === 4)
assert(plans(0).metrics("numOutputRows").value === 4)
assert(plans.head.metrics("numInputRows").value === 4)
assert(plans.head.metrics("numOutputRows").value === 4)
}
}

Expand All @@ -97,16 +99,17 @@ class GlutenClickHouseTPCHColumnarShuffleParquetAQESuite
assert(plans.size == 3)

assert(plans(2).metrics("numFiles").value === 1)
assert(plans(2).metrics("pruningTime").value === -1)
val pruningTimeValue = if (isSparkVersionGE("3.4")) 0 else -1
assert(plans(2).metrics("pruningTime").value === pruningTimeValue)
assert(plans(2).metrics("filesSize").value === 19230111)

assert(plans(1).metrics("numInputRows").value === 591673)
assert(plans(1).metrics("numOutputRows").value === 4)
assert(plans(1).metrics("outputVectors").value === 1)

// Execute Sort operator, it will read the data twice.
assert(plans(0).metrics("numOutputRows").value === 8)
assert(plans(0).metrics("outputVectors").value === 2)
assert(plans.head.metrics("numOutputRows").value === 8)
assert(plans.head.metrics("outputVectors").value === 2)
}
}
}
Expand Down Expand Up @@ -147,8 +150,8 @@ class GlutenClickHouseTPCHColumnarShuffleParquetAQESuite
assert(inputIteratorTransformers(1).metrics("numInputRows").value === 3111)
assert(inputIteratorTransformers(1).metrics("numOutputRows").value === 3111)

assert(inputIteratorTransformers(0).metrics("numInputRows").value === 15224)
assert(inputIteratorTransformers(0).metrics("numOutputRows").value === 15224)
assert(inputIteratorTransformers.head.metrics("numInputRows").value === 15224)
assert(inputIteratorTransformers.head.metrics("numOutputRows").value === 15224)
}
}
}
Expand Down

0 comments on commit 3190bc9

Please sign in to comment.