public class Projections extends Object
Modifier and Type | Method and Description |
---|---|
static RequestedTuple |
build(List<RequestedColumn> projList)
Create a requested tuple projection from a rewritten top-level
projection list.
|
static boolean |
excludeFromWildcard(ColumnMetadata col)
Reports whether the column is a special column which should not be
expanded in a wildcard.
|
static RequestedTuple |
parse(Collection<SchemaPath> projList)
Parse a projection list.
|
static RequestedTuple |
projectAll() |
static RequestedTuple |
projectNone() |
public static RequestedTuple projectAll()
public static RequestedTuple projectNone()
public static RequestedTuple parse(Collection<SchemaPath> projList)
The projection list may include both a wildcard and column names (as in the case of implicit columns.) This results in a final list that both says that everything is projected, and provides the list of columns.
Parsing is used at two different times. First, to parse the list from the physical operator. This has the case above: an explicit wildcard and/or additional columns. Then, this class is used again to prepare the physical projection used when reading. In this case, wildcards should be removed, implicit columns pulled out, and just the list of read-level columns should remain.
projList
- the list of projected columns, or null if no projection is to be
donepublic static RequestedTuple build(List<RequestedColumn> projList)
projList
- top-level, parsed columnspublic static boolean excludeFromWildcard(ColumnMetadata col)
Copyright © 1970 The Apache Software Foundation. All rights reserved.