Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangyang Gao committed Oct 23, 2023
1 parent 043cf83 commit e25a7f0
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,23 @@ class VeloxColumnarCacheSuite extends VeloxWholeStageTransformerSuite with Adapt
}
}

// test("Support transform count(1) with table cache") {
// val cached = spark.table("lineitem").cache()
// try {
// val df = spark.sql("SELECT COUNT(*) FROM lineitem")
// checkAnswer(df, Row(60175))
// assert(
// find(df.queryExecution.executedPlan) {
// case _: RowToVeloxColumnarExec => true
// case _ => false
// }.isEmpty
// )
// } finally {
// cached.unpersist()
// }
// }
test("Support transform count(1) with table cache") {
withSQLConf(GlutenConfig.COLUMNAR_TABLE_CACHE_ENABLED.key -> "true") {
val cached = spark.table("lineitem").cache()
try {
val df = spark.sql("SELECT COUNT(*) FROM lineitem")
checkAnswer(df, Row(60175))
assert(
find(df.queryExecution.executedPlan) {
case _: RowToVeloxColumnarExec => true
case _ => false
}.isEmpty
)
} finally {
cached.unpersist()
}
}
}

test("no ColumnarToRow for table cache") {
val cached = spark.table("lineitem").cache()
Expand Down

0 comments on commit e25a7f0

Please sign in to comment.