Yohahaha commented on code in PR #9529:
URL: https://github.com/apache/incubator-gluten/pull/9529#discussion_r2075592045
##########
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala:
##########
@@ -664,4 +665,38 @@ abstract class IcebergSuite extends
WholeStageTransformerSuite {
assert(result.head.getString(1) == "test_data")
}
}
+
+ test("fallback re add column") {
+ val testTable = "test_table_with_re_add_column"
+ withTable(testTable) {
+ spark.sql(s"""
+ |CREATE TABLE $testTable (id INT, data STRING)
+ |USING iceberg
+ |""".stripMargin)
+ spark.sql(s"""
+ |INSERT INTO $testTable VALUES
+ |(1, 'test_data');
+ |""".stripMargin)
+
+ // drop column
+ spark.sql(s"""
+ |ALTER TABLE $testTable DROP COLUMN data;
+ |""".stripMargin)
+
+ // re add column
+ spark.sql(s"""
+ |ALTER TABLE $testTable ADD COLUMNS (data STRING);
+ |""".stripMargin)
+ // insert data
+ spark.sql(s"""
+ |INSERT INTO $testTable VALUES
+ | (2, 'new_data');
+ | """.stripMargin)
+ runQueryAndCompare("""
+ |select * from p_str_tb;
Review Comment:
should be `$testTable` ?
--
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]