You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/09 21:51:40 UTC

[GitHub] [iceberg] jackye1995 commented on a change in pull request #3697: API: Add Immutables to FileScanTask's subclasses

jackye1995 commented on a change in pull request #3697:
URL: https://github.com/apache/iceberg/pull/3697#discussion_r766181971



##########
File path: core/src/main/java/org/apache/iceberg/BaseFileScanTask.java
##########
@@ -20,71 +20,69 @@
 package org.apache.iceberg;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
+import javax.annotation.Nullable;
 import org.apache.iceberg.expressions.Expression;
 import org.apache.iceberg.expressions.ResidualEvaluator;
 import org.apache.iceberg.relocated.com.google.common.annotations.VisibleForTesting;
 import org.apache.iceberg.relocated.com.google.common.base.MoreObjects;
 import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
-
-class BaseFileScanTask implements FileScanTask {
-  private final DataFile file;
-  private final DeleteFile[] deletes;
-  private final String schemaString;
-  private final String specString;
-  private final ResidualEvaluator residuals;
-
-  private transient PartitionSpec spec = null;
-
-  BaseFileScanTask(DataFile file, DeleteFile[] deletes, String schemaString, String specString,
-                   ResidualEvaluator residuals) {
-    this.file = file;
-    this.deletes = deletes != null ? deletes : new DeleteFile[0];
-    this.schemaString = schemaString;
-    this.specString = specString;
-    this.residuals = residuals;
+import org.immutables.value.Value;
+
+@Value.Immutable
+abstract class BaseFileScanTask implements FileScanTask {

Review comment:
       Unfortunately we cannot use @JsonSerialize and @JsonDeserialize in Trino and PrestoDB, see https://github.com/trinodb/trino/pull/8754#discussion_r681375336 for context.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org