Package io.delta.kernel.defaults.engine
Class DefaultJsonHandler
Object
io.delta.kernel.defaults.engine.DefaultJsonHandler
- All Implemented Interfaces:
io.delta.kernel.engine.JsonHandler
Default implementation of
JsonHandler based on Hadoop APIs.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.delta.kernel.data.ColumnarBatchparseJson(io.delta.kernel.data.ColumnVector jsonStringVector, io.delta.kernel.types.StructType outputSchema, Optional<io.delta.kernel.data.ColumnVector> selectionVector) io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.ColumnarBatch> readJsonFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> scanFileIter, io.delta.kernel.types.StructType physicalSchema, Optional<io.delta.kernel.expressions.Predicate> predicate) voidwriteJsonFileAtomically(String filePath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.Row> data, boolean overwrite) Makes use ofLogStoreimplementations in `delta-storage` to atomically write the data to a file depending upon the destination filesystem.
-
Constructor Details
-
DefaultJsonHandler
-
-
Method Details
-
parseJson
public io.delta.kernel.data.ColumnarBatch parseJson(io.delta.kernel.data.ColumnVector jsonStringVector, io.delta.kernel.types.StructType outputSchema, Optional<io.delta.kernel.data.ColumnVector> selectionVector) - Specified by:
parseJsonin interfaceio.delta.kernel.engine.JsonHandler
-
readJsonFiles
public io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.ColumnarBatch> readJsonFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> scanFileIter, io.delta.kernel.types.StructType physicalSchema, Optional<io.delta.kernel.expressions.Predicate> predicate) throws IOException - Specified by:
readJsonFilesin interfaceio.delta.kernel.engine.JsonHandler- Throws:
IOException
-
writeJsonFileAtomically
public void writeJsonFileAtomically(String filePath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.Row> data, boolean overwrite) throws IOException Makes use ofLogStoreimplementations in `delta-storage` to atomically write the data to a file depending upon the destination filesystem.- Specified by:
writeJsonFileAtomicallyin interfaceio.delta.kernel.engine.JsonHandler- Parameters:
filePath- Destination file pathdata- Data to write as Json- Throws:
IOException
-