public class ConstantColumnLoader extends StaticColumnLoader
The values for the columns appear in the column definitions. This works because the metadata columns are re-resolved for for each file, picking up file-specific values. In some cases, a column might not even have a value (such as a reference to a dirN level that isn't defined for a particular file.
That said, this class is agnostic about the source and meaning of the columns: it only cares that the columns are of type nullable Varchar and that the values are in the column nodes.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ConstantColumnLoader.ConstantColumnSpec |
loader, vectorCache| Constructor and Description |
|---|
ConstantColumnLoader(ResultVectorCache vectorCache,
List<? extends ConstantColumnLoader.ConstantColumnSpec> defns) |
| Modifier and Type | Method and Description |
|---|---|
List<? extends ConstantColumnLoader.ConstantColumnSpec> |
columns() |
VectorContainer |
load(int rowCount)
Populate static vectors with the defined static values.
|
closepublic ConstantColumnLoader(ResultVectorCache vectorCache, List<? extends ConstantColumnLoader.ConstantColumnSpec> defns)
public VectorContainer load(int rowCount)
StaticColumnLoaderload in class StaticColumnLoaderrowCount - number of rows to generate. Must match the
row count in the batch returned by the readerpublic List<? extends ConstantColumnLoader.ConstantColumnSpec> columns()
Copyright © 2021 The Apache Software Foundation. All rights reserved.