Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 committed Dec 6, 2023
1 parent 3be5544 commit c58c079
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ class GlutenClickHouseTPCHMetricsSuite extends GlutenClickHouseTPCHAbstractSuite
case g: GlutenPlan if !g.isInstanceOf[InputIteratorTransformer] => g
}

// scalastyle:off println
println("=========================")
allGlutenPlans.foreach {
p =>
println(p.toString)
}
println("=========================")
val scanPlan = allGlutenPlans(10)
assert(scanPlan.metrics("scanTime").value == 2)
assert(scanPlan.metrics("inputWaitTime").value == 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,21 @@ class CollapseProjectExecTransformerSuite
|LIMIT
| 100;
|""".stripMargin
withSQLConf(GlutenConfig.ENABLE_COLUMNAR_PROJECT_COLLAPSE.key -> "false") {
runQueryAndCompare(query) {
df =>
{
assert(
getExecutedPlan(df).exists {
case _ @ProjectExecTransformer(_, _: ProjectExecTransformer) => true
case _ => false
Seq(true, false).foreach {
collapsed =>
withSQLConf(GlutenConfig.ENABLE_COLUMNAR_PROJECT_COLLAPSE.key -> collapsed.toString) {
runQueryAndCompare(query) {
df =>
{
assert(
getExecutedPlan(df).exists {
case _ @ProjectExecTransformer(_, _: ProjectExecTransformer) => true
case _ => false
} == !collapsed
)
}
)
}
}
}
withSQLConf(GlutenConfig.ENABLE_COLUMNAR_PROJECT_COLLAPSE.key -> "true") {
runQueryAndCompare(query) {
df =>
{
assert(
!getExecutedPlan(df).exists {
case _ @ProjectExecTransformer(_, _: ProjectExecTransformer) => true
case _ => false
}
)
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions ep/build-clickhouse/src/build_clickhouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ done

echo ${GLUTEN_SOURCE}

export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export CC=${CC:-clang-15}
export CXX=${CXX:-clang++-15}
cmake -G Ninja -S ${GLUTEN_SOURCE}/cpp-ch -B ${GLUTEN_SOURCE}/cpp-ch/build_ch -DCH_SOURCE_DIR=${CH_SOURCE_DIR} "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
cmake --build ${GLUTEN_SOURCE}/cpp-ch/build_ch --target build_ch
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ object CollapseProjectTransformer extends Rule[SparkPlan] {
p1.projectList,
p2.projectList,
alwaysInline = false) =>
p2.copy(projectList =
val collapsedProject = p2.copy(projectList =
CollapseProjectShim.buildCleanedProjectList(p1.projectList, p2.projectList))
val validationResult = collapsedProject.doValidate()
if (validationResult.isValid) {
logDebug(s"Collapse project $p1 and $p2.")
collapsedProject
} else {
plan
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ object GlutenConfig {
.internal()
.doc("Combines two columnar project operators into one and perform alias substitution")
.booleanConf
.createWithDefault(false)
.createWithDefault(true)

val COLUMNAR_VELOX_BLOOM_FILTER_EXPECTED_NUM_ITEMS =
buildConf("spark.gluten.sql.columnar.backend.velox.bloomFilter.expectedNumItems")
Expand Down

0 comments on commit c58c079

Please sign in to comment.