public class ResultVectorCacheImpl extends Object implements ResultVectorCache
ResultSetLoader class handles this by managing the set of vectors
used by a single reader.
Readers are independent: each may read a distinct schema (as in JSON.) Yet, the Drill protocol requires minimizing spurious OK_NEW_SCHEMA events. As a result, two readers run by the same scan operator must share the same set of vectors, despite the fact that they may have different schemas and thus different ResultSetLoaders.
The purpose of this inventory is to persist vectors across readers, even when, say, reader B does not use a vector that reader A created.
The semantics supported by this class include:
| Constructor and Description |
|---|
ResultVectorCacheImpl(BufferAllocator allocator) |
ResultVectorCacheImpl(BufferAllocator allocator,
boolean permissiveMode) |
| Modifier and Type | Method and Description |
|---|---|
BufferAllocator |
allocator() |
ResultVectorCache |
childCache(String colName) |
void |
close() |
TypeProtos.MajorType |
getType(String name) |
boolean |
isPermissive() |
void |
newBatch() |
void |
predefine(List<String> selected) |
void |
trimUnused() |
ValueVector |
vectorFor(MaterializedField colSchema) |
public ResultVectorCacheImpl(BufferAllocator allocator)
public ResultVectorCacheImpl(BufferAllocator allocator, boolean permissiveMode)
public BufferAllocator allocator()
allocator in interface ResultVectorCachepublic void newBatch()
public void trimUnused()
public ValueVector vectorFor(MaterializedField colSchema)
vectorFor in interface ResultVectorCachepublic TypeProtos.MajorType getType(String name)
getType in interface ResultVectorCachepublic void close()
public boolean isPermissive()
isPermissive in interface ResultVectorCachepublic ResultVectorCache childCache(String colName)
childCache in interface ResultVectorCacheCopyright © 2021 The Apache Software Foundation. All rights reserved.