jinchengchenghh commented on code in PR #10646:
URL:
https://github.com/apache/incubator-gluten/pull/10646#discussion_r2333188371
##########
backends-velox/src-iceberg/test/scala/org/apache/gluten/execution/enhanced/VeloxIcebergSuite.scala:
##########
@@ -190,4 +192,29 @@ class VeloxIcebergSuite extends IcebergSuite {
assert(result(0).get(0) == 2)
}
}
+
+ test("iceberg create table as select") {
+ withTable("iceberg_tb1", "iceberg_tb2") {
+ spark.sql("""
+ |create table iceberg_tb1 (a int, pt int) using iceberg
+ |partitioned by (pt)
+ |""".stripMargin)
+
+ spark.sql("insert into table iceberg_tb1 values (1, 1), (2, 2)")
+
+ // CTAS
+ val sqlStr = """
+ |create table iceberg_tb2 using iceberg
+ |partitioned by (pt)
+ |as select * from iceberg_tb1
+ |""".stripMargin
+
+ TestUtils.checkExecutedPlanContains[VeloxIcebergAppendDataExec](spark,
sqlStr)
Review Comment:
Could we use assert(
getExecutedPlan(df).exists(
plan =>
plan.find(_.isInstanceOf[VeloxIcebergAppendDataExec]).isDefined))
--
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]