Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonymous committed Aug 1, 2023
1 parent 115abb3 commit 0cff6e1
Show file tree
Hide file tree
Showing 39 changed files with 137 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* 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.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down
Loading

0 comments on commit 0cff6e1

Please sign in to comment.