liujiayi771 commented on code in PR #4779:
URL: https://github.com/apache/incubator-gluten/pull/4779#discussion_r1519260934
##########
gluten-iceberg/src/test/scala/io/glutenproject/execution/VeloxIcebergSuite.scala:
##########
@@ -42,15 +43,54 @@ class VeloxIcebergSuite extends WholeStageTransformerSuite {
}
test("iceberg transformer exists") {
- spark.sql("""
- |create table iceberg_tb using iceberg as
- |(select 1 as col1, 2 as col2, 3 as col3)
- |""".stripMargin)
+ withTable("iceberg_tb") {
+ spark.sql("""
+ |create table iceberg_tb using iceberg as
+ |(select 1 as col1, 2 as col2, 3 as col3)
+ |""".stripMargin)
- runQueryAndCompare("""
- |select * from iceberg_tb;
- |""".stripMargin) {
- checkOperatorMatch[IcebergScanTransformer]
+ runQueryAndCompare("""
+ |select * from iceberg_tb;
+ |""".stripMargin) {
+ checkOperatorMatch[IcebergScanTransformer]
+ }
+ }
+ }
+
+ test("iceberg read mor table") {
+ withTable("iceberg_mor_tb") {
+ withSQLConf(GlutenConfig.GLUTEN_ENABLE_KEY -> "false") {
+ spark.sql("""
+ |create table iceberg_mor_tb (
+ | id int,
+ | name string,
+ | p string
+ |) using iceberg
+ |tblproperties (
+ | 'format-version' = '2',
+ | 'write.delete.mode' = 'merge-on-read',
+ | 'write.update.mode' = 'merge-on-read',
+ | 'write.merge.mode' = 'merge-on-read'
+ |)
+ |partitioned by (p);
+ |""".stripMargin)
+ // Insert some test rows.
+ spark.sql("""
+ |insert into table iceberg_mor_tb
+ |values (1, 'a1', 'p1'), (2, 'a2', 'p1'), (3, 'a3', 'p2');
+ |""".stripMargin)
+ // Delete row.
Review Comment:
@yma11 @YannByron While adding test cases, I discovered a bug in the Velox
code. I will fix this bug first before updating the current PR. Later on, I
will add test cases for MERGE INTO and UPDATE, as well as multiple DELETE
operations.
--
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]