Class UnionListWriter
java.lang.Object
org.apache.drill.exec.vector.complex.impl.UnionListWriter
- All Implemented Interfaces:
AutoCloseable
,Positionable
,BaseWriter
,BaseWriter.DictWriter
,BaseWriter.ListWriter
,BaseWriter.MapWriter
,BaseWriter.ScalarWriter
,BigIntWriter
,BitWriter
,DateWriter
,Decimal18Writer
,Decimal28DenseWriter
,Decimal28SparseWriter
,Decimal38DenseWriter
,Decimal38SparseWriter
,Decimal9Writer
,FieldWriter
,Float4Writer
,Float8Writer
,IntervalDayWriter
,IntervalWriter
,IntervalYearWriter
,IntWriter
,SmallIntWriter
,TimeStampWriter
,TimeWriter
,TinyIntWriter
,UInt1Writer
,UInt2Writer
,UInt4Writer
,UInt8Writer
,Var16CharWriter
,VarBinaryWriter
,VarCharWriter
,VarDecimalWriter
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.complex.writer.BaseWriter
BaseWriter.ComplexWriter, BaseWriter.DictWriter, BaseWriter.ListWriter, BaseWriter.MapOrListWriter, BaseWriter.MapWriter, BaseWriter.ScalarWriter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUnionListWriter
(ListVector vector) UnionListWriter
(ListVector vector, org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate()
bigInt()
bit()
void
clear()
void
close()
void
copyReader
(FieldReader reader) void
copyReaderToField
(String name, FieldReader reader) date()
decimal18
(int precision, int scale) decimal28Dense
(int precision, int scale) decimal28Dense
(String name) decimal28Dense
(String name, int precision, int scale) decimal28Sparse
(int precision, int scale) decimal28Sparse
(String name) decimal28Sparse
(String name, int precision, int scale) decimal38Dense
(int precision, int scale) decimal38Dense
(String name) decimal38Dense
(String name, int precision, int scale) decimal38Sparse
(int precision, int scale) decimal38Sparse
(String name) decimal38Sparse
(String name, int precision, int scale) decimal9()
decimal9
(int precision, int scale) dict()
void
end()
void
Finalizes writing values to key and value writers.void
endList()
float4()
float8()
getField()
int
integer()
interval()
intervalDay
(String name) intervalYear
(String name) boolean
This implementation returnsfalse
.boolean
isRoot()
list()
map()
void
setPosition
(int index) smallInt()
void
start()
void
Prepares key and value writers to write new values.void
time()
tinyInt()
toString()
uInt1()
uInt2()
uInt4()
uInt8()
union()
varChar()
varDecimal
(int precision, int scale) varDecimal
(String name) varDecimal
(String name, int precision, int scale) void
write
(BigIntHolder holder) void
void
write
(DateHolder holder) void
write
(Decimal18Holder holder) void
write
(Decimal28DenseHolder holder) void
write
(Decimal28SparseHolder holder) void
write
(Decimal38DenseHolder holder) void
write
(Decimal38SparseHolder holder) void
write
(Decimal9Holder holder) void
write
(Float4Holder holder) void
write
(Float8Holder holder) void
write
(IntervalDayHolder holder) void
write
(IntervalHolder holder) void
write
(IntervalYearHolder holder) void
void
write
(SmallIntHolder holder) void
write
(TimeHolder holder) void
write
(TimeStampHolder holder) void
write
(TinyIntHolder holder) void
write
(UInt1Holder holder) void
write
(UInt2Holder holder) void
write
(UInt4Holder holder) void
write
(UInt8Holder holder) void
write
(Var16CharHolder holder) void
write
(VarBinaryHolder holder) void
write
(VarCharHolder holder) void
write
(VarDecimalHolder holder) void
writeBigInt
(long value) void
writeBit
(int value) void
writeDate
(long value) void
writeDecimal18
(long value, int precision, int scale) void
writeDecimal18
(BigDecimal value) void
writeDecimal28Dense
(int start, DrillBuf buffer, int precision, int scale) void
writeDecimal28Dense
(BigDecimal value) void
writeDecimal28Sparse
(int start, DrillBuf buffer, int precision, int scale) void
writeDecimal28Sparse
(BigDecimal value) void
writeDecimal38Dense
(int start, DrillBuf buffer, int precision, int scale) void
writeDecimal38Dense
(BigDecimal value) void
writeDecimal38Sparse
(int start, DrillBuf buffer, int precision, int scale) void
writeDecimal38Sparse
(BigDecimal value) void
writeDecimal9
(int value, int precision, int scale) void
writeDecimal9
(BigDecimal value) void
writeFloat4
(float value) void
writeFloat8
(double value) void
writeInt
(int value) void
writeInterval
(int months, int days, int milliseconds) void
writeIntervalDay
(int days, int milliseconds) void
writeIntervalYear
(int value) void
void
writeSmallInt
(short value) void
writeTime
(int value) void
writeTimeStamp
(long value) void
writeTinyInt
(byte value) void
writeUInt1
(byte value) void
writeUInt2
(char value) void
writeUInt4
(int value) void
writeUInt8
(long value) void
writeVar16Char
(int start, int end, DrillBuf buffer) void
writeVarBinary
(int start, int end, DrillBuf buffer) void
writeVarChar
(int start, int end, DrillBuf buffer) void
writeVarDecimal
(int start, int end, DrillBuf buffer, int precision, int scale) void
writeVarDecimal
(BigDecimal value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.vector.complex.writer.BaseWriter
getParent
Methods inherited from interface org.apache.drill.exec.vector.complex.Positionable
setPosition
-
Field Details
-
writer
-
-
Constructor Details
-
UnionListWriter
-
UnionListWriter
public UnionListWriter(ListVector vector, org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter parent)
-
-
Method Details
-
allocate
public void allocate() -
clear
public void clear() -
getField
-
getValueCapacity
public int getValueCapacity() -
close
- Throws:
Exception
-
tinyInt
- Specified by:
tinyInt
in interfaceBaseWriter.ListWriter
-
tinyInt
- Specified by:
tinyInt
in interfaceBaseWriter.MapWriter
-
uInt1
- Specified by:
uInt1
in interfaceBaseWriter.ListWriter
-
uInt1
- Specified by:
uInt1
in interfaceBaseWriter.MapWriter
-
uInt2
- Specified by:
uInt2
in interfaceBaseWriter.ListWriter
-
uInt2
- Specified by:
uInt2
in interfaceBaseWriter.MapWriter
-
smallInt
- Specified by:
smallInt
in interfaceBaseWriter.ListWriter
-
smallInt
- Specified by:
smallInt
in interfaceBaseWriter.MapWriter
-
integer
- Specified by:
integer
in interfaceBaseWriter.ListWriter
-
integer
- Specified by:
integer
in interfaceBaseWriter.MapWriter
-
uInt4
- Specified by:
uInt4
in interfaceBaseWriter.ListWriter
-
uInt4
- Specified by:
uInt4
in interfaceBaseWriter.MapWriter
-
float4
- Specified by:
float4
in interfaceBaseWriter.ListWriter
-
float4
- Specified by:
float4
in interfaceBaseWriter.MapWriter
-
time
- Specified by:
time
in interfaceBaseWriter.ListWriter
-
time
- Specified by:
time
in interfaceBaseWriter.MapWriter
-
intervalYear
- Specified by:
intervalYear
in interfaceBaseWriter.ListWriter
-
intervalYear
- Specified by:
intervalYear
in interfaceBaseWriter.MapWriter
-
bigInt
- Specified by:
bigInt
in interfaceBaseWriter.ListWriter
-
bigInt
- Specified by:
bigInt
in interfaceBaseWriter.MapWriter
-
uInt8
- Specified by:
uInt8
in interfaceBaseWriter.ListWriter
-
uInt8
- Specified by:
uInt8
in interfaceBaseWriter.MapWriter
-
float8
- Specified by:
float8
in interfaceBaseWriter.ListWriter
-
float8
- Specified by:
float8
in interfaceBaseWriter.MapWriter
-
date
- Specified by:
date
in interfaceBaseWriter.ListWriter
-
date
- Specified by:
date
in interfaceBaseWriter.MapWriter
-
timeStamp
- Specified by:
timeStamp
in interfaceBaseWriter.ListWriter
-
timeStamp
- Specified by:
timeStamp
in interfaceBaseWriter.MapWriter
-
intervalDay
- Specified by:
intervalDay
in interfaceBaseWriter.ListWriter
-
intervalDay
- Specified by:
intervalDay
in interfaceBaseWriter.MapWriter
-
interval
- Specified by:
interval
in interfaceBaseWriter.ListWriter
-
interval
- Specified by:
interval
in interfaceBaseWriter.MapWriter
-
varBinary
- Specified by:
varBinary
in interfaceBaseWriter.ListWriter
-
varBinary
- Specified by:
varBinary
in interfaceBaseWriter.MapWriter
-
varChar
- Specified by:
varChar
in interfaceBaseWriter.ListWriter
-
varChar
- Specified by:
varChar
in interfaceBaseWriter.MapWriter
-
var16Char
- Specified by:
var16Char
in interfaceBaseWriter.ListWriter
-
var16Char
- Specified by:
var16Char
in interfaceBaseWriter.MapWriter
-
varDecimal
- Specified by:
varDecimal
in interfaceBaseWriter.ListWriter
-
varDecimal
- Specified by:
varDecimal
in interfaceBaseWriter.MapWriter
-
bit
- Specified by:
bit
in interfaceBaseWriter.ListWriter
-
bit
- Specified by:
bit
in interfaceBaseWriter.MapWriter
-
map
- Specified by:
map
in interfaceBaseWriter.ListWriter
-
list
- Specified by:
list
in interfaceBaseWriter.ListWriter
-
list
- Specified by:
list
in interfaceBaseWriter.MapWriter
-
map
- Specified by:
map
in interfaceBaseWriter.MapWriter
-
startList
public void startList()- Specified by:
startList
in interfaceBaseWriter.ListWriter
-
endList
public void endList()- Specified by:
endList
in interfaceBaseWriter.ListWriter
-
start
public void start()- Specified by:
start
in interfaceBaseWriter.MapWriter
-
end
public void end()- Specified by:
end
in interfaceBaseWriter.MapWriter
-
writeTinyInt
public void writeTinyInt(byte value) - Specified by:
writeTinyInt
in interfaceTinyIntWriter
-
writeUInt1
public void writeUInt1(byte value) - Specified by:
writeUInt1
in interfaceUInt1Writer
-
writeUInt2
public void writeUInt2(char value) - Specified by:
writeUInt2
in interfaceUInt2Writer
-
writeSmallInt
public void writeSmallInt(short value) - Specified by:
writeSmallInt
in interfaceSmallIntWriter
-
writeInt
public void writeInt(int value) -
writeUInt4
public void writeUInt4(int value) - Specified by:
writeUInt4
in interfaceUInt4Writer
-
writeFloat4
public void writeFloat4(float value) - Specified by:
writeFloat4
in interfaceFloat4Writer
-
writeTime
public void writeTime(int value) - Specified by:
writeTime
in interfaceTimeWriter
-
writeIntervalYear
public void writeIntervalYear(int value) - Specified by:
writeIntervalYear
in interfaceIntervalYearWriter
-
writeBigInt
public void writeBigInt(long value) - Specified by:
writeBigInt
in interfaceBigIntWriter
-
writeUInt8
public void writeUInt8(long value) - Specified by:
writeUInt8
in interfaceUInt8Writer
-
writeFloat8
public void writeFloat8(double value) - Specified by:
writeFloat8
in interfaceFloat8Writer
-
writeDate
public void writeDate(long value) - Specified by:
writeDate
in interfaceDateWriter
-
writeTimeStamp
public void writeTimeStamp(long value) - Specified by:
writeTimeStamp
in interfaceTimeStampWriter
-
writeIntervalDay
public void writeIntervalDay(int days, int milliseconds) - Specified by:
writeIntervalDay
in interfaceIntervalDayWriter
-
writeInterval
public void writeInterval(int months, int days, int milliseconds) - Specified by:
writeInterval
in interfaceIntervalWriter
-
writeVarBinary
- Specified by:
writeVarBinary
in interfaceVarBinaryWriter
-
writeVarChar
- Specified by:
writeVarChar
in interfaceVarCharWriter
-
writeVar16Char
- Specified by:
writeVar16Char
in interfaceVar16CharWriter
-
writeVarDecimal
- Specified by:
writeVarDecimal
in interfaceVarDecimalWriter
-
writeBit
public void writeBit(int value) -
write
- Specified by:
write
in interfaceTinyIntWriter
-
write
- Specified by:
write
in interfaceUInt1Writer
-
write
- Specified by:
write
in interfaceUInt2Writer
-
write
- Specified by:
write
in interfaceSmallIntWriter
-
write
-
write
- Specified by:
write
in interfaceUInt4Writer
-
write
- Specified by:
write
in interfaceFloat4Writer
-
write
- Specified by:
write
in interfaceTimeWriter
-
write
- Specified by:
write
in interfaceIntervalYearWriter
-
write
- Specified by:
write
in interfaceDecimal9Writer
-
writeDecimal9
public void writeDecimal9(int value, int precision, int scale) -
writeDecimal9
-
write
- Specified by:
write
in interfaceBigIntWriter
-
write
- Specified by:
write
in interfaceUInt8Writer
-
write
- Specified by:
write
in interfaceFloat8Writer
-
write
- Specified by:
write
in interfaceDateWriter
-
write
- Specified by:
write
in interfaceTimeStampWriter
-
write
- Specified by:
write
in interfaceDecimal18Writer
-
writeDecimal18
public void writeDecimal18(long value, int precision, int scale) -
writeDecimal18
-
write
- Specified by:
write
in interfaceIntervalDayWriter
-
write
- Specified by:
write
in interfaceIntervalWriter
-
write
- Specified by:
write
in interfaceDecimal28DenseWriter
-
writeDecimal28Dense
- Specified by:
writeDecimal28Dense
in interfaceDecimal28DenseWriter
-
writeDecimal28Dense
-
write
- Specified by:
write
in interfaceDecimal38DenseWriter
-
writeDecimal38Dense
- Specified by:
writeDecimal38Dense
in interfaceDecimal38DenseWriter
-
writeDecimal38Dense
-
write
- Specified by:
write
in interfaceDecimal38SparseWriter
-
writeDecimal38Sparse
- Specified by:
writeDecimal38Sparse
in interfaceDecimal38SparseWriter
-
writeDecimal38Sparse
-
write
- Specified by:
write
in interfaceDecimal28SparseWriter
-
writeDecimal28Sparse
- Specified by:
writeDecimal28Sparse
in interfaceDecimal28SparseWriter
-
writeDecimal28Sparse
-
write
- Specified by:
write
in interfaceVarBinaryWriter
-
write
- Specified by:
write
in interfaceVarCharWriter
-
write
- Specified by:
write
in interfaceVar16CharWriter
-
write
- Specified by:
write
in interfaceVarDecimalWriter
-
writeVarDecimal
- Specified by:
writeVarDecimal
in interfaceVarDecimalWriter
-
write
-
writeNull
public void writeNull() -
isEmptyMap
public boolean isEmptyMap()This implementation returnsfalse
.Must be overridden by map writers.
- Specified by:
isEmptyMap
in interfaceBaseWriter.MapWriter
-
dict
- Specified by:
dict
in interfaceBaseWriter.ListWriter
-
dict
- Specified by:
dict
in interfaceBaseWriter.MapWriter
-
getKeyWriter
- Specified by:
getKeyWriter
in interfaceBaseWriter.DictWriter
-
getValueWriter
- Specified by:
getValueWriter
in interfaceBaseWriter.DictWriter
-
startKeyValuePair
public void startKeyValuePair()Description copied from interface:BaseWriter.DictWriter
Prepares key and value writers to write new values. Must be invoked before writing data to these fields.- Specified by:
startKeyValuePair
in interfaceBaseWriter.DictWriter
-
endKeyValuePair
public void endKeyValuePair()Description copied from interface:BaseWriter.DictWriter
Finalizes writing values to key and value writers. Must be invoked after the values for the fields are written.- Specified by:
endKeyValuePair
in interfaceBaseWriter.DictWriter
-
union
- Specified by:
union
in interfaceBaseWriter.MapWriter
-
union
- Specified by:
union
in interfaceBaseWriter.ListWriter
-
decimal9
- Specified by:
decimal9
in interfaceBaseWriter.MapWriter
-
decimal9
- Specified by:
decimal9
in interfaceBaseWriter.ListWriter
-
decimal9
- Specified by:
decimal9
in interfaceBaseWriter.MapWriter
-
decimal9
- Specified by:
decimal9
in interfaceBaseWriter.ListWriter
-
decimal18
- Specified by:
decimal18
in interfaceBaseWriter.MapWriter
-
decimal18
- Specified by:
decimal18
in interfaceBaseWriter.ListWriter
-
decimal18
- Specified by:
decimal18
in interfaceBaseWriter.MapWriter
-
decimal18
- Specified by:
decimal18
in interfaceBaseWriter.ListWriter
-
decimal28Dense
- Specified by:
decimal28Dense
in interfaceBaseWriter.MapWriter
-
decimal28Dense
- Specified by:
decimal28Dense
in interfaceBaseWriter.ListWriter
-
decimal28Dense
- Specified by:
decimal28Dense
in interfaceBaseWriter.MapWriter
-
decimal28Dense
- Specified by:
decimal28Dense
in interfaceBaseWriter.ListWriter
-
decimal38Dense
- Specified by:
decimal38Dense
in interfaceBaseWriter.MapWriter
-
decimal38Dense
- Specified by:
decimal38Dense
in interfaceBaseWriter.ListWriter
-
decimal38Dense
- Specified by:
decimal38Dense
in interfaceBaseWriter.MapWriter
-
decimal38Dense
- Specified by:
decimal38Dense
in interfaceBaseWriter.ListWriter
-
decimal38Sparse
- Specified by:
decimal38Sparse
in interfaceBaseWriter.MapWriter
-
decimal38Sparse
- Specified by:
decimal38Sparse
in interfaceBaseWriter.ListWriter
-
decimal38Sparse
- Specified by:
decimal38Sparse
in interfaceBaseWriter.MapWriter
-
decimal38Sparse
- Specified by:
decimal38Sparse
in interfaceBaseWriter.ListWriter
-
decimal28Sparse
- Specified by:
decimal28Sparse
in interfaceBaseWriter.MapWriter
-
decimal28Sparse
- Specified by:
decimal28Sparse
in interfaceBaseWriter.ListWriter
-
decimal28Sparse
- Specified by:
decimal28Sparse
in interfaceBaseWriter.MapWriter
-
decimal28Sparse
- Specified by:
decimal28Sparse
in interfaceBaseWriter.ListWriter
-
varDecimal
- Specified by:
varDecimal
in interfaceBaseWriter.ListWriter
-
varDecimal
- Specified by:
varDecimal
in interfaceBaseWriter.MapWriter
-
copyReader
- Specified by:
copyReader
in interfaceBaseWriter.ListWriter
-
copyReaderToField
- Specified by:
copyReaderToField
in interfaceBaseWriter.MapWriter
-
toString
-
getParent
- Specified by:
getParent
in interfaceBaseWriter
-
isRoot
public boolean isRoot() -
setPosition
public void setPosition(int index) - Specified by:
setPosition
in interfacePositionable
-