diff --git a/gluten-core/src/main/java/io/glutenproject/substrait/rel/ExtensionTableNode.java b/gluten-core/src/main/java/io/glutenproject/substrait/rel/ExtensionTableNode.java index 72ec7a37feb0..93b10d73ef77 100644 --- a/gluten-core/src/main/java/io/glutenproject/substrait/rel/ExtensionTableNode.java +++ b/gluten-core/src/main/java/io/glutenproject/substrait/rel/ExtensionTableNode.java @@ -20,11 +20,10 @@ import com.google.protobuf.StringValue; import io.substrait.proto.ReadRel; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; -public class ExtensionTableNode implements ReadSplit, Serializable { +public class ExtensionTableNode implements ReadSplit { private static final String MERGE_TREE = "MergeTree;"; private Long minPartsNum; private Long maxPartsNum; diff --git a/gluten-core/src/main/java/io/glutenproject/substrait/rel/LocalFilesNode.java b/gluten-core/src/main/java/io/glutenproject/substrait/rel/LocalFilesNode.java index 26bb5a1b7132..f64cafc0f065 100644 --- a/gluten-core/src/main/java/io/glutenproject/substrait/rel/LocalFilesNode.java +++ b/gluten-core/src/main/java/io/glutenproject/substrait/rel/LocalFilesNode.java @@ -25,12 +25,11 @@ import org.apache.spark.sql.types.StructField; import org.apache.spark.sql.types.StructType; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Map; -public class LocalFilesNode implements ReadSplit, Serializable { +public class LocalFilesNode implements ReadSplit { private final Integer index; private final List paths = new ArrayList<>(); private final List starts = new ArrayList<>(); diff --git a/gluten-core/src/main/java/io/glutenproject/substrait/rel/ReadSplit.java b/gluten-core/src/main/java/io/glutenproject/substrait/rel/ReadSplit.java index 2571f2d64d9e..ed7ffbda636f 100644 --- a/gluten-core/src/main/java/io/glutenproject/substrait/rel/ReadSplit.java +++ b/gluten-core/src/main/java/io/glutenproject/substrait/rel/ReadSplit.java @@ -18,9 +18,16 @@ import com.google.protobuf.MessageOrBuilder; +import java.io.Serializable; import java.util.List; -public interface ReadSplit { +/** + * A serializable representation of a read split for native engine, including the file path and + * other information of the scan table. It is returned by {@link + * io.glutenproject.execution.BasicScanExecTransformer#getReadSplits()}. + */ +public interface ReadSplit extends Serializable { + /** The preferred locations where the table files returned by this read split can run faster. */ List preferredLocations(); MessageOrBuilder toProtobuf();