See: Description
Interface | Description |
---|---|
AbstractTupleWriter.TupleWriterListener |
Listener (callback) to handle requests to add a new column to a tuple (row
or map).
|
OffsetVectorWriter |
Interface for specialized operations on an offset vector.
|
RepeatedListWriter.ArrayListener | |
UnionWriterImpl.UnionShim | |
WriterEvents |
Internal interface used to control the behavior
of writers.
|
WriterEvents.ColumnWriterListener |
Listener (callback) for vector overflow events.
|
Class | Description |
---|---|
AbstractArrayWriter |
Writer for an array-valued column.
|
AbstractArrayWriter.ArrayObjectWriter |
Object representation of an array writer.
|
AbstractArrayWriter.BaseArrayWriter | |
AbstractFixedWidthWriter |
Base class for writers for fixed-width vectors.
|
AbstractFixedWidthWriter.BaseFixedWidthWriter | |
AbstractFixedWidthWriter.BaseIntWriter |
Base class for writers that use the Java int type as their native
type.
|
AbstractObjectWriter |
Abstract base class for the object layer in writers.
|
AbstractScalarWriter |
Base class for concrete scalar column writers including actual vector
writers, and wrappers for nullable types.
|
AbstractScalarWriterImpl |
Column writer implementation that acts as the basis for the
generated, vector-specific implementations.
|
AbstractScalarWriterImpl.ScalarObjectWriter |
Wraps a scalar writer and its event handler to provide a uniform
JSON-like interface for all writer types.
|
AbstractTupleWriter |
Implementation for a writer for a tuple (a row or a map.) Provides access to each
column using either a name or a numeric index.
|
AbstractTupleWriter.TupleObjectWriter |
Generic object wrapper for the tuple writer.
|
BaseScalarWriter |
Column writer implementation that acts as the basis for the
generated, vector-specific implementations.
|
BaseVarWidthWriter |
Base class for variable-width (VarChar, VarBinary, etc.) writers.
|
BitColumnWriter |
Specialized writer for bit columns.
|
ColumnWriterFactory |
Gather generated writer classes into a set of class tables to allow rapid
run-time creation of writers.
|
DictEntryWriter |
Writer for a Dict entry.
|
DictEntryWriter.DictEntryObjectWriter | |
EmptyListShim |
Internal implementation for a list of (possible) variants when
the list has no type associated with it at all.
|
ListWriterImpl |
List writer, which is basically an array writer, with the addition
that each list element can be null.
|
MapWriter |
Writer for a Drill Map type.
|
MapWriter.ArrayMapWriter |
Writer for a an array of maps.
|
MapWriter.DummyArrayMapWriter | |
MapWriter.DummyMapWriter | |
MapWriter.SingleMapWriter |
Writer for a single (non-array) map.
|
NullableScalarWriter | |
NullableScalarWriter.ChildIndex | |
ObjectArrayWriter |
Writer for an array of either a map or another array.
|
ObjectDictWriter |
The implementation represents the writer as an array writer
with special dict entry writer as its element writer.
|
ObjectDictWriter.DictObjectWriter | |
OffsetVectorWriterImpl |
Specialized column writer for the (hidden) offset vector used
with variable-length or repeated vectors.
|
RepeatedListWriter |
Implements a writer for a repeated list.
|
ScalarArrayWriter |
Writer for a column that holds an array of scalars.
|
SimpleListShim |
Shim for a list that holds a single type, but may eventually become a
list of variants.
|
UnionVectorShim |
Lists can operate in three modes: no type, one type or many
types (that is, a list of unions.) This shim implements the
variant writer when the backing vector is a union or a list
backed by a union.
|
UnionWriterImpl |
Writer to a union vector.
|
UnionWriterImpl.VariantObjectWriter |
Enum | Description |
---|---|
WriterEvents.State |
Tracks the write state of a tuple or variant to allow applying the correct
operations to newly-added columns to synchronize them with the rest
of the writers.
|
A repeated map, a list, a repeated list and any array (repeated) scalar all are array-like. Nullable and required modes are identical (single values), but a nullable has an additional is-set ("bit") vector.
The writers (and readers) borrow concepts from JSON and relational theory to simplify the problem:
This data model is similar to; but has important differences from, the prior, generated, readers and writers. This version is based on the concept of minimizing the number of writer classes, and leveraging Java primitives to keep the number of get/set methods to a reasonable size. This version also automates vector allocation, vector overflow and so on.
The object layer is new: it is the simplest way to model the three "object types." An app using this code would use just the leaf scalar readers and writers.
Similarly, the ColumnWriter
interface provides a uniform way to
access services common to all writer types, while allowing each JSON-like
writer to provide type-specific ways to access data.
The most complex part is List support for the transition from a single type to a union of types. The API should be simple: the client should not have to be aware of the transition.
To make this work, the writers provide two options:
The PromotableListWriter
handles the complex details of providing
the above simple API in the array-of-variant case.
+------------+
+-------------------------- | Result Set |
v | Loader |
+----------------+ +---------+ +------------+
| Metadata | <-- | Row Set | |
| Implementation | | Tools | |
+----------------+ +---------+ |
java-exec | | |
------------------- | ------------------- | ------ | ------------
vector v v v
+------------+ +-----------+
| Metadata | <--------- | Column |
| Interfaces | | Accessors |
+------------+ +-----------+
|
v
+---------+
| Value |
| Vectors |
+---------+
Copyright © 2021 The Apache Software Foundation. All rights reserved.