diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultExpressionHandler.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultExpressionHandler.java similarity index 91% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultExpressionHandler.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultExpressionHandler.java index 747980376b..5a59d61f35 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultExpressionHandler.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultExpressionHandler.java @@ -14,24 +14,25 @@ * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.sql.Date; import java.sql.Timestamp; import java.util.Optional; +import io.delta.kernel.client.ExpressionHandler; import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.data.Row; -import io.delta.kernel.data.vector.DefaultBooleanVector; -import io.delta.kernel.data.vector.DefaultConstantVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultBooleanVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultConstantVector; import io.delta.kernel.expressions.Expression; import io.delta.kernel.expressions.ExpressionEvaluator; import io.delta.kernel.expressions.Literal; import io.delta.kernel.types.*; import io.delta.kernel.utils.CloseableIterator; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; -import static io.delta.kernel.DefaultKernelUtils.daysSinceEpoch; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.daysSinceEpoch; public class DefaultExpressionHandler implements ExpressionHandler diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileHandler.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileHandler.java similarity index 91% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileHandler.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileHandler.java index 1bac721852..3c3f1bb48c 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileHandler.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileHandler.java @@ -13,10 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import static java.util.Objects.requireNonNull; +import io.delta.kernel.client.FileHandler; +import io.delta.kernel.client.FileReadContext; import io.delta.kernel.data.Row; import io.delta.kernel.expressions.Expression; import io.delta.kernel.utils.CloseableIterator; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileReadContext.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileReadContext.java similarity index 92% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileReadContext.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileReadContext.java index b694f6702a..394922014a 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileReadContext.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileReadContext.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import static java.util.Objects.requireNonNull; +import io.delta.kernel.client.FileReadContext; import io.delta.kernel.data.Row; public class DefaultFileReadContext diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileSystemClient.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileSystemClient.java similarity index 97% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileSystemClient.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileSystemClient.java index ca08d21f6b..9b9c6e5615 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultFileSystemClient.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultFileSystemClient.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.io.ByteArrayInputStream; import java.io.DataInputStream; @@ -27,6 +27,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import io.delta.kernel.client.FileSystemClient; import io.delta.kernel.fs.FileStatus; import io.delta.kernel.utils.CloseableIterator; import io.delta.kernel.utils.Tuple2; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultJsonHandler.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultJsonHandler.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultJsonHandler.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultJsonHandler.java index e024542ee1..d345bed244 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultJsonHandler.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultJsonHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.io.BufferedReader; import java.io.IOException; @@ -32,17 +32,19 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import io.delta.kernel.client.FileReadContext; +import io.delta.kernel.client.JsonHandler; import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.data.DefaultJsonRow; -import io.delta.kernel.data.DefaultRowBasedColumnarBatch; +import io.delta.kernel.defaults.internal.data.DefaultJsonRow; +import io.delta.kernel.defaults.internal.data.DefaultRowBasedColumnarBatch; import io.delta.kernel.data.FileDataReadResult; import io.delta.kernel.data.Row; import io.delta.kernel.fs.FileStatus; import io.delta.kernel.types.StructType; import io.delta.kernel.utils.CloseableIterator; import io.delta.kernel.utils.Utils; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; public class DefaultJsonHandler extends DefaultFileHandler diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultParquetHandler.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultParquetHandler.java similarity index 94% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultParquetHandler.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultParquetHandler.java index 8fd02eb6ff..5b8edecb1e 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultParquetHandler.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultParquetHandler.java @@ -13,17 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.io.IOException; import org.apache.hadoop.conf.Configuration; +import io.delta.kernel.client.FileReadContext; +import io.delta.kernel.client.ParquetHandler; import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.data.FileDataReadResult; import io.delta.kernel.data.Row; import io.delta.kernel.fs.FileStatus; -import io.delta.kernel.parquet.ParquetBatchReader; +import io.delta.kernel.defaults.internal.parquet.ParquetBatchReader; import io.delta.kernel.types.StructType; import io.delta.kernel.utils.CloseableIterator; import io.delta.kernel.utils.Utils; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultTableClient.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultTableClient.java similarity index 85% rename from kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultTableClient.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultTableClient.java index 7626a2212b..0a1f1ce81f 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/client/DefaultTableClient.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/client/DefaultTableClient.java @@ -13,10 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import org.apache.hadoop.conf.Configuration; +import io.delta.kernel.client.ExpressionHandler; +import io.delta.kernel.client.FileSystemClient; +import io.delta.kernel.client.JsonHandler; +import io.delta.kernel.client.ParquetHandler; +import io.delta.kernel.client.TableClient; + public class DefaultTableClient implements TableClient { diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/DefaultKernelUtils.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/DefaultKernelUtils.java similarity index 99% rename from kernel/kernel-default/src/main/java/io/delta/kernel/DefaultKernelUtils.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/DefaultKernelUtils.java index 0c3f0801d6..74ca7fb437 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/DefaultKernelUtils.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/DefaultKernelUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel; +package io.delta.kernel.defaults.internal; import java.sql.Date; import java.time.LocalDate; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultColumnarBatch.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultColumnarBatch.java similarity index 96% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultColumnarBatch.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultColumnarBatch.java index 09d82c89eb..25940e5531 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultColumnarBatch.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultColumnarBatch.java @@ -13,13 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data; +package io.delta.kernel.defaults.internal.data; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; +import io.delta.kernel.data.ColumnVector; +import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.types.StructField; import io.delta.kernel.types.StructType; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultJsonRow.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultJsonRow.java similarity index 99% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultJsonRow.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultJsonRow.java index 96b0038326..adda484ba3 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultJsonRow.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultJsonRow.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data; +package io.delta.kernel.defaults.internal.data; import java.util.ArrayList; import java.util.HashMap; @@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import io.delta.kernel.data.Row; import io.delta.kernel.types.ArrayType; import io.delta.kernel.types.BooleanType; import io.delta.kernel.types.DataType; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultRowBasedColumnarBatch.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultRowBasedColumnarBatch.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultRowBasedColumnarBatch.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultRowBasedColumnarBatch.java index 8d54ed0cd6..7094ff05da 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/DefaultRowBasedColumnarBatch.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/DefaultRowBasedColumnarBatch.java @@ -13,15 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data; +package io.delta.kernel.defaults.internal.data; import java.util.List; import java.util.Map; +import io.delta.kernel.data.ColumnVector; +import io.delta.kernel.data.ColumnarBatch; +import io.delta.kernel.data.Row; import io.delta.kernel.types.DataType; import io.delta.kernel.types.StructField; import io.delta.kernel.types.StructType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link ColumnarBatch} wrapper around list of {@link Row} objects. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/AbstractColumnVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/AbstractColumnVector.java similarity index 96% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/AbstractColumnVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/AbstractColumnVector.java index e3848774dd..49919fcbd3 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/AbstractColumnVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/AbstractColumnVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.List; import java.util.Map; @@ -23,7 +23,7 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.Row; import io.delta.kernel.types.DataType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * Abstract implementation of {@link ColumnVector} that provides the default functionality diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultArrayVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultArrayVector.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultArrayVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultArrayVector.java index a5035c176d..b4a10fca9b 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultArrayVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultArrayVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.ArrayList; import java.util.List; @@ -22,7 +22,7 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.types.DataType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for array type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBinaryVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBinaryVector.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBinaryVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBinaryVector.java index c1d078bfe8..b8dd0520f3 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBinaryVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBinaryVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -23,7 +23,7 @@ import io.delta.kernel.types.BinaryType; import io.delta.kernel.types.DataType; import io.delta.kernel.types.StringType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for binary type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBooleanVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBooleanVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBooleanVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBooleanVector.java index dd4bee6142..f058dec764 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultBooleanVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultBooleanVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.BooleanType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for boolean type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultByteVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultByteVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultByteVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultByteVector.java index ac791dfdd3..232d5e47c9 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultByteVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultByteVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.ByteType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for byte type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultConstantVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultConstantVector.java similarity index 97% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultConstantVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultConstantVector.java index 9729972f0d..3645a758fe 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultConstantVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultConstantVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.List; import java.util.Map; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultDoubleVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultDoubleVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultDoubleVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultDoubleVector.java index 725dd71e83..27bf2bd67d 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultDoubleVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultDoubleVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.DoubleType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for double type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultFloatVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultFloatVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultFloatVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultFloatVector.java index f339c330a8..b9f7e59bd8 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultFloatVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultFloatVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.FloatType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for float type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultIntVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultIntVector.java similarity index 94% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultIntVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultIntVector.java index 775b9092f2..061cf4f834 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultIntVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultIntVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; @@ -21,7 +21,7 @@ import io.delta.kernel.types.DataType; import io.delta.kernel.types.DateType; import io.delta.kernel.types.IntegerType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for integer type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultLongVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultLongVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultLongVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultLongVector.java index 8fe18a96a0..22ed398522 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultLongVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultLongVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.LongType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for long type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultMapVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultMapVector.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultMapVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultMapVector.java index 9ee858845c..724c42ea6a 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultMapVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultMapVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.HashMap; import java.util.Map; @@ -22,7 +22,7 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.types.DataType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for map type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultShortVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultShortVector.java similarity index 93% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultShortVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultShortVector.java index ce636b5c8d..a380e9b14f 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultShortVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultShortVector.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.Optional; import static java.util.Objects.requireNonNull; import io.delta.kernel.types.ShortType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for short type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultStructVector.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultStructVector.java similarity index 97% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultStructVector.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultStructVector.java index 4811c573f6..8313d0101a 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/DefaultStructVector.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultStructVector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import java.util.List; import java.util.Map; @@ -24,7 +24,7 @@ import io.delta.kernel.data.Row; import io.delta.kernel.types.DataType; import io.delta.kernel.types.StructType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; /** * {@link io.delta.kernel.data.ColumnVector} implementation for struct type data. diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/VectorUtils.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/VectorUtils.java similarity index 97% rename from kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/VectorUtils.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/VectorUtils.java index 17d53935e7..27350c8233 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/data/vector/VectorUtils.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/data/vector/VectorUtils.java @@ -1,4 +1,4 @@ -package io.delta.kernel.data.vector; +package io.delta.kernel.defaults.internal.data.vector; import io.delta.kernel.data.ColumnVector; import io.delta.kernel.types.ArrayType; diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ArrayConverter.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ArrayConverter.java similarity index 91% rename from kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ArrayConverter.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ArrayConverter.java index 3303276a7d..e624b4ca40 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ArrayConverter.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ArrayConverter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.util.Arrays; import java.util.Optional; @@ -24,10 +24,8 @@ import org.apache.parquet.schema.GroupType; import io.delta.kernel.data.ColumnVector; -import io.delta.kernel.data.vector.DefaultArrayVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultArrayVector; import io.delta.kernel.types.ArrayType; -import static io.delta.kernel.parquet.ParquetConverters.initNullabilityVector; -import static io.delta.kernel.parquet.ParquetConverters.setNullabilityToTrue; class ArrayConverter extends GroupConverter @@ -56,7 +54,7 @@ class ArrayConverter ); // initialize working state - this.nullability = initNullabilityVector(initialBatchSize); + this.nullability = ParquetConverters.initNullabilityVector(initialBatchSize); this.offsets = new int[initialBatchSize + 1]; } @@ -115,7 +113,7 @@ public void resizeIfNeeded() if (nullability.length == currentRowIndex) { int newSize = nullability.length * 2; this.nullability = Arrays.copyOf(this.nullability, newSize); - setNullabilityToTrue(this.nullability, newSize / 2, newSize); + ParquetConverters.setNullabilityToTrue(this.nullability, newSize / 2, newSize); this.offsets = Arrays.copyOf(this.offsets, newSize + 1); } @@ -125,7 +123,7 @@ public void resizeIfNeeded() public void resetWorkingState() { this.currentRowIndex = 0; - this.nullability = initNullabilityVector(nullability.length); + this.nullability = ParquetConverters.initNullabilityVector(nullability.length); this.offsets = new int[offsets.length]; } diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/MapConverter.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/MapConverter.java similarity index 92% rename from kernel/kernel-default/src/main/java/io/delta/kernel/parquet/MapConverter.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/MapConverter.java index 8bc781da1f..118ffa5343 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/MapConverter.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/MapConverter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.util.Arrays; import java.util.Optional; @@ -24,10 +24,8 @@ import org.apache.parquet.schema.GroupType; import io.delta.kernel.data.ColumnVector; -import io.delta.kernel.data.vector.DefaultMapVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultMapVector; import io.delta.kernel.types.MapType; -import static io.delta.kernel.parquet.ParquetConverters.initNullabilityVector; -import static io.delta.kernel.parquet.ParquetConverters.setNullabilityToTrue; class MapConverter extends GroupConverter @@ -56,7 +54,7 @@ class MapConverter ); // initialize working state - this.nullability = initNullabilityVector(initialBatchSize); + this.nullability = ParquetConverters.initNullabilityVector(initialBatchSize); this.offsets = new int[initialBatchSize + 1]; } @@ -117,7 +115,7 @@ public void resizeIfNeeded() if (nullability.length == currentRowIndex) { int newSize = nullability.length * 2; this.nullability = Arrays.copyOf(this.nullability, newSize); - setNullabilityToTrue(this.nullability, newSize / 2, newSize); + ParquetConverters.setNullabilityToTrue(this.nullability, newSize / 2, newSize); this.offsets = Arrays.copyOf(this.offsets, newSize + 1); } } @@ -127,7 +125,7 @@ public void resetWorkingState() { this.currentRowIndex = 0; this.converter.currentEntryIndex = 0; - this.nullability = initNullabilityVector(nullability.length); + this.nullability = ParquetConverters.initNullabilityVector(nullability.length); this.offsets = new int[offsets.length]; } diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetBatchReader.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetBatchReader.java similarity index 97% rename from kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetBatchReader.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetBatchReader.java index 1956182f41..88aa090289 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetBatchReader.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetBatchReader.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.io.IOException; import java.net.URI; @@ -34,11 +34,11 @@ import org.apache.parquet.io.api.RecordMaterializer; import org.apache.parquet.schema.MessageType; -import io.delta.kernel.DefaultKernelUtils; +import io.delta.kernel.defaults.internal.DefaultKernelUtils; import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.types.StructType; import io.delta.kernel.utils.CloseableIterator; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; public class ParquetBatchReader { diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetConverters.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetConverters.java similarity index 95% rename from kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetConverters.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetConverters.java index 06d46c8535..62d5554df7 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/ParquetConverters.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/ParquetConverters.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.util.Arrays; import java.util.Objects; @@ -26,15 +26,15 @@ import org.apache.parquet.schema.Type; import io.delta.kernel.data.ColumnVector; -import io.delta.kernel.data.vector.DefaultBinaryVector; -import io.delta.kernel.data.vector.DefaultBooleanVector; -import io.delta.kernel.data.vector.DefaultByteVector; -import io.delta.kernel.data.vector.DefaultConstantVector; -import io.delta.kernel.data.vector.DefaultDoubleVector; -import io.delta.kernel.data.vector.DefaultFloatVector; -import io.delta.kernel.data.vector.DefaultIntVector; -import io.delta.kernel.data.vector.DefaultLongVector; -import io.delta.kernel.data.vector.DefaultShortVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultBinaryVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultBooleanVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultByteVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultConstantVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultDoubleVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultFloatVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultIntVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultLongVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultShortVector; import io.delta.kernel.types.ArrayType; import io.delta.kernel.types.BinaryType; import io.delta.kernel.types.BooleanType; @@ -49,7 +49,7 @@ import io.delta.kernel.types.ShortType; import io.delta.kernel.types.StringType; import io.delta.kernel.types.StructType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; class ParquetConverters { diff --git a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/RowConverter.java b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/RowConverter.java similarity index 94% rename from kernel/kernel-default/src/main/java/io/delta/kernel/parquet/RowConverter.java rename to kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/RowConverter.java index 5ee6c1deab..c33eeb8d2b 100644 --- a/kernel/kernel-default/src/main/java/io/delta/kernel/parquet/RowConverter.java +++ b/kernel/kernel-default/src/main/java/io/delta/kernel/defaults/internal/parquet/RowConverter.java @@ -1,4 +1,4 @@ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.util.Arrays; import java.util.HashMap; @@ -14,14 +14,14 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.data.DefaultColumnarBatch; -import io.delta.kernel.data.vector.DefaultStructVector; +import io.delta.kernel.defaults.internal.data.DefaultColumnarBatch; +import io.delta.kernel.defaults.internal.data.vector.DefaultStructVector; import io.delta.kernel.types.DataType; import io.delta.kernel.types.LongType; import io.delta.kernel.types.StructField; import io.delta.kernel.types.StructType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; -import static io.delta.kernel.DefaultKernelUtils.findSubFieldType; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.findSubFieldType; class RowConverter extends GroupConverter diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultExpressionHandler.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultExpressionHandler.java similarity index 96% rename from kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultExpressionHandler.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultExpressionHandler.java index 60ae28e33b..917aad7842 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultExpressionHandler.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultExpressionHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.sql.Date; import java.sql.Timestamp; @@ -29,16 +29,17 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.data.DefaultColumnarBatch; -import io.delta.kernel.data.vector.DefaultIntVector; -import io.delta.kernel.data.vector.DefaultLongVector; +import io.delta.kernel.defaults.internal.data.DefaultColumnarBatch; +import io.delta.kernel.defaults.internal.data.vector.DefaultIntVector; +import io.delta.kernel.defaults.internal.data.vector.DefaultLongVector; +import io.delta.kernel.defaults.client.DefaultExpressionHandler; import io.delta.kernel.expressions.And; import io.delta.kernel.expressions.Column; import io.delta.kernel.expressions.EqualTo; import io.delta.kernel.expressions.Expression; import io.delta.kernel.expressions.Literal; import io.delta.kernel.types.*; -import static io.delta.kernel.DefaultKernelUtils.daysSinceEpoch; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.daysSinceEpoch; public class TestDefaultExpressionHandler { diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultFileSystemClient.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultFileSystemClient.java similarity index 92% rename from kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultFileSystemClient.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultFileSystemClient.java index 60e9a18502..cafe6edf06 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultFileSystemClient.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultFileSystemClient.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.util.ArrayList; import java.util.Arrays; @@ -25,7 +25,7 @@ import io.delta.kernel.fs.FileStatus; import io.delta.kernel.utils.CloseableIterator; -import static io.delta.kernel.utils.DefaultKernelTestUtils.getTestResourceFilePath; +import static io.delta.kernel.defaults.utils.DefaultKernelTestUtils.getTestResourceFilePath; public class TestDefaultFileSystemClient { diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultJsonHandler.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultJsonHandler.java similarity index 95% rename from kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultJsonHandler.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultJsonHandler.java index 7dbcf081c2..62731e8875 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/client/TestDefaultJsonHandler.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/client/TestDefaultJsonHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.client; +package io.delta.kernel.defaults.client; import java.util.ArrayList; import java.util.Arrays; @@ -27,8 +27,11 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; +import io.delta.kernel.client.FileReadContext; +import io.delta.kernel.client.FileSystemClient; +import io.delta.kernel.client.JsonHandler; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.data.DefaultJsonRow; +import io.delta.kernel.defaults.internal.data.DefaultJsonRow; import io.delta.kernel.data.FileDataReadResult; import io.delta.kernel.data.Row; import io.delta.kernel.expressions.Literal; @@ -40,7 +43,7 @@ import io.delta.kernel.types.StructType; import io.delta.kernel.utils.CloseableIterator; import io.delta.kernel.utils.Utils; -import static io.delta.kernel.utils.DefaultKernelTestUtils.getTestResourceFilePath; +import static io.delta.kernel.defaults.utils.DefaultKernelTestUtils.getTestResourceFilePath; public class TestDefaultJsonHandler { diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/BaseIntegration.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/BaseIntegration.java similarity index 97% rename from kernel/kernel-default/src/test/java/io/delta/kernel/integration/BaseIntegration.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/BaseIntegration.java index 8339388912..9385eeb020 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/BaseIntegration.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/BaseIntegration.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.integration; +package io.delta.kernel.defaults.integration; import java.util.ArrayList; import java.util.HashSet; @@ -32,13 +32,14 @@ import io.delta.kernel.Scan; import io.delta.kernel.Snapshot; import io.delta.kernel.Table; -import io.delta.kernel.client.DefaultTableClient; +import io.delta.kernel.defaults.client.DefaultTableClient; import io.delta.kernel.client.TableClient; import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.data.DataReadResult; import io.delta.kernel.data.Row; -import io.delta.kernel.data.vector.VectorUtils; +import io.delta.kernel.defaults.internal.data.vector.VectorUtils; +import io.delta.kernel.defaults.utils.DefaultKernelTestUtils; import io.delta.kernel.types.ArrayType; import io.delta.kernel.types.DataType; import io.delta.kernel.types.DecimalType; @@ -47,7 +48,6 @@ import io.delta.kernel.types.StructType; import io.delta.kernel.types.TimestampType; import io.delta.kernel.utils.CloseableIterator; -import io.delta.kernel.utils.DefaultKernelTestUtils; /** * Base class containing utility method to write integration tests that read data from diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/DataBuilderUtils.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/DataBuilderUtils.java similarity index 95% rename from kernel/kernel-default/src/test/java/io/delta/kernel/integration/DataBuilderUtils.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/DataBuilderUtils.java index e9a0b33840..49bf1cfd47 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/DataBuilderUtils.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/DataBuilderUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.integration; +package io.delta.kernel.defaults.integration; import java.util.ArrayList; import java.util.HashMap; @@ -22,10 +22,10 @@ import java.util.stream.IntStream; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.data.DefaultRowBasedColumnarBatch; +import io.delta.kernel.defaults.internal.data.DefaultRowBasedColumnarBatch; import io.delta.kernel.data.Row; import io.delta.kernel.types.StructType; -import static io.delta.kernel.DefaultKernelUtils.checkArgument; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.checkArgument; public class DataBuilderUtils { diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/TestDeltaTableReads.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/TestDeltaTableReads.java similarity index 93% rename from kernel/kernel-default/src/test/java/io/delta/kernel/integration/TestDeltaTableReads.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/TestDeltaTableReads.java index e4cab2d6e7..17f583081e 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/integration/TestDeltaTableReads.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/integration/TestDeltaTableReads.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.integration; +package io.delta.kernel.defaults.integration; import java.sql.Date; import java.util.Arrays; @@ -26,14 +26,14 @@ import static io.delta.golden.GoldenTableUtils.goldenTablePath; import io.delta.kernel.Snapshot; -import io.delta.kernel.client.DefaultTableClient; +import io.delta.kernel.defaults.client.DefaultTableClient; import io.delta.kernel.client.TableClient; import io.delta.kernel.data.ColumnarBatch; -import io.delta.kernel.integration.DataBuilderUtils.TestColumnBatchBuilder; +import io.delta.kernel.defaults.utils.DefaultKernelTestUtils; +import io.delta.kernel.defaults.integration.DataBuilderUtils.TestColumnBatchBuilder; import io.delta.kernel.types.*; -import static io.delta.kernel.DefaultKernelUtils.daysSinceEpoch; -import static io.delta.kernel.integration.DataBuilderUtils.row; -import static io.delta.kernel.utils.DefaultKernelTestUtils.getTestResourceFilePath; +import static io.delta.kernel.defaults.internal.DefaultKernelUtils.daysSinceEpoch; +import static io.delta.kernel.defaults.integration.DataBuilderUtils.row; /** * Test reading Delta lake tables end to end using the Kernel APIs and default {@link TableClient} @@ -305,7 +305,7 @@ public void tableWithComplexMapTypes() public void tableWithCheckpoint() throws Exception { - String tablePath = getTestResourceFilePath("basic-with-checkpoint"); + String tablePath = DefaultKernelTestUtils.getTestResourceFilePath("basic-with-checkpoint"); Snapshot snapshot = snapshot(tablePath); StructType readSchema = snapshot.getSchema(tableClient); @@ -323,7 +323,7 @@ public void tableWithCheckpoint() public void tableWithNameColumnMappingMode() throws Exception { - String tablePath = getTestResourceFilePath("data-reader-primitives-column-mapping-name"); + String tablePath = DefaultKernelTestUtils.getTestResourceFilePath("data-reader-primitives-column-mapping-name"); Snapshot snapshot = snapshot(tablePath); StructType readSchema = removeUnsupportedType(snapshot.getSchema(tableClient)); @@ -355,7 +355,7 @@ public void partitionedTableWithColumnMapping() throws Exception { String tablePath = - getTestResourceFilePath("data-reader-partition-values-column-mapping-name"); + DefaultKernelTestUtils.getTestResourceFilePath("data-reader-partition-values-column-mapping-name"); Snapshot snapshot = snapshot(tablePath); StructType readSchema = new StructType() // partition fields @@ -385,7 +385,7 @@ public void columnMappingIdModeThrowsError() expectedEx.expect(UnsupportedOperationException.class); expectedEx.expectMessage("Unsupported column mapping mode: id"); - String tablePath = getTestResourceFilePath("column-mapping-id"); + String tablePath = DefaultKernelTestUtils.getTestResourceFilePath("column-mapping-id"); Snapshot snapshot = snapshot(tablePath); readSnapshot(snapshot.getSchema(tableClient), snapshot); } diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/parquet/TestParquetBatchReader.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/internal/parquet/TestParquetBatchReader.java similarity index 99% rename from kernel/kernel-default/src/test/java/io/delta/kernel/parquet/TestParquetBatchReader.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/internal/parquet/TestParquetBatchReader.java index caca394f16..9e567a02d8 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/parquet/TestParquetBatchReader.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/internal/parquet/TestParquetBatchReader.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.parquet; +package io.delta.kernel.defaults.internal.parquet; import java.io.File; import java.io.IOException; @@ -35,6 +35,7 @@ import io.delta.kernel.data.ColumnVector; import io.delta.kernel.data.ColumnarBatch; import io.delta.kernel.data.Row; +import io.delta.kernel.defaults.internal.parquet.ParquetBatchReader; import io.delta.kernel.types.ArrayType; import io.delta.kernel.types.BinaryType; import io.delta.kernel.types.BooleanType; @@ -50,7 +51,7 @@ import io.delta.kernel.types.StructField; import io.delta.kernel.types.StructType; import io.delta.kernel.utils.CloseableIterator; -import io.delta.kernel.utils.DefaultKernelTestUtils; +import io.delta.kernel.defaults.utils.DefaultKernelTestUtils; import io.delta.kernel.utils.Tuple2; public class TestParquetBatchReader diff --git a/kernel/kernel-default/src/test/java/io/delta/kernel/utils/DefaultKernelTestUtils.java b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/utils/DefaultKernelTestUtils.java similarity index 98% rename from kernel/kernel-default/src/test/java/io/delta/kernel/utils/DefaultKernelTestUtils.java rename to kernel/kernel-default/src/test/java/io/delta/kernel/defaults/utils/DefaultKernelTestUtils.java index ba06a69a9d..ae0d783946 100644 --- a/kernel/kernel-default/src/test/java/io/delta/kernel/utils/DefaultKernelTestUtils.java +++ b/kernel/kernel-default/src/test/java/io/delta/kernel/defaults/utils/DefaultKernelTestUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel.utils; +package io.delta.kernel.defaults.utils; import io.delta.kernel.data.Row; import io.delta.kernel.types.*; diff --git a/kernel/kernel-default/src/test/scala/io/delta/kernel/DeletionVectorSuite.scala b/kernel/kernel-default/src/test/scala/io/delta/kernel/defaults/integration/DeletionVectorSuite.scala similarity index 95% rename from kernel/kernel-default/src/test/scala/io/delta/kernel/DeletionVectorSuite.scala rename to kernel/kernel-default/src/test/scala/io/delta/kernel/defaults/integration/DeletionVectorSuite.scala index 0f2a2c6d51..70985ea470 100644 --- a/kernel/kernel-default/src/test/scala/io/delta/kernel/DeletionVectorSuite.scala +++ b/kernel/kernel-default/src/test/scala/io/delta/kernel/defaults/integration/DeletionVectorSuite.scala @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.delta.kernel +package io.delta.kernel.defaults.integration import java.util.Optional @@ -21,10 +21,12 @@ import scala.collection.mutable.ArrayBuffer import scala.reflect.ClassTag import io.delta.golden.GoldenTableUtils.goldenTablePath -import io.delta.kernel.client.DefaultTableClient +import io.delta.kernel.{Scan, Table} import io.delta.kernel.data.Row -import io.delta.kernel.types.{IntegerType, LongType, StringType, StructType} -import io.delta.kernel.utils.{CloseableIterator, DefaultKernelTestUtils} +import io.delta.kernel.defaults.client.DefaultTableClient +import io.delta.kernel.defaults.utils.DefaultKernelTestUtils +import io.delta.kernel.types.{LongType, StructType} +import io.delta.kernel.utils.CloseableIterator import org.apache.hadoop.conf.Configuration import org.scalatest.funsuite.AnyFunSuite