flyrain commented on code in PR #4588:
URL: https://github.com/apache/iceberg/pull/4588#discussion_r954355333
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java:
##########
@@ -362,6 +388,8 @@ public void testEqualityDeleteWithDeletedColumn() throws
IOException {
rowSet(tableName, PROJECTION_SCHEMA.asStruct(), "id", "data",
"_deleted");
Assert.assertEquals("Table should contain expected row", expected, actual);
+ long expectedDeletes = 3L;
+ checkDeleteCount(expectedDeletes);
Review Comment:
Nit: seems not necessary to have them in two lines, but just my personal
preference.
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java:
##########
@@ -130,16 +140,19 @@ protected Table createTable(String name, Schema schema,
PartitionSpec spec) {
TableOperations ops = ((BaseTable) table).operations();
TableMetadata meta = ops.current();
ops.commit(meta, meta.upgradeToFormatVersion(2));
- if (vectorized) {
+ table.updateProperties().set(TableProperties.DEFAULT_FILE_FORMAT,
format).commit();
+ if (format.equals("parquet") && vectorized) {
table
.updateProperties()
.set(TableProperties.PARQUET_VECTORIZATION_ENABLED, "true")
.set(
TableProperties.PARQUET_BATCH_SIZE,
"4") // split 7 records to two batches to cover more code paths
.commit();
- } else {
+ } else if (format.equals("parquet")) { // in this case, non-vectorized
table.updateProperties().set(TableProperties.PARQUET_VECTORIZATION_ENABLED,
"false").commit();
+ } else if (format.equals("orc")) { // we only have non-vectorized for orc
in our parameters
+ table.updateProperties().set(TableProperties.ORC_VECTORIZATION_ENABLED,
"false").commit();
Review Comment:
Minor suggestion: this will cover all cases, and no comment is needed.
```
if (format.equals("parquet")) {
table.updateProperties().set(TableProperties.PARQUET_VECTORIZATION_ENABLED,
String.valueOf(vectorized)).commit();
if (vectorized) {
table.updateProperties().set(TableProperties.PARQUET_BATCH_SIZE,
"4").commit();
}
} else if (format.equals("orc")) {
table.updateProperties().set(TableProperties.ORC_VECTORIZATION_ENABLED,
String.valueOf(vectorized)).commit();
if (vectorized) {
table.updateProperties().set(TableProperties.ORC_BATCH_SIZE,
"4").commit();
}
}
```
--
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]