public enum StructKind extends Enum<StructKind>
The usual value is FULLY_QUALIFIED.
A field whose record type is labeled PEEK_FIELDS can be omitted.
In Phoenix, column families are represented by fields like this.
PEEK_FIELDS_DEFAULT is similar, but represents the default column
family, so it will win in the event of a tie.
SQL usually disallows a record type. For instance,
SELECT address.zip FROM Emp AS e
is disallowed because address "looks like" a table alias. You'd
have to write
SELECT e.address.zip FROM Emp AS e
But if a table has one or more columns that are record-typed and are
labeled PEEK_FIELDS or PEEK_FIELDS_DEFAULT we suspend that
rule and would allow address.zip.
If there are multiple matches, we choose the one that is:
zipcode, address.zipcode will
be preferred over product.supplier.zipcode.
PEEK_FIELDS_DEFAULT at some point, which
will beat one that uses PEEK_FIELDS at some point.
| Enum Constant and Description |
|---|
FULLY_QUALIFIED
This is a traditional structured type, where each field must be
referenced explicitly.
|
NONE
This is not a structured type.
|
PEEK_FIELDS
If a field has this type, you can see its fields without qualifying them
with the name of this field.
|
PEEK_FIELDS_DEFAULT
As
PEEK_FIELDS, but takes priority if another struct-typed
field also has a field of the name being sought. |
PEEK_FIELDS_NO_EXPAND
As
PEEK_FIELDS, but fields are not expanded in "SELECT *". |
| Modifier and Type | Method and Description |
|---|---|
static StructKind |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StructKind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StructKind NONE
public static final StructKind FULLY_QUALIFIED
Also, when referencing a struct column, you
need to qualify it with the table alias, per standard SQL. For instance,
SELECT c.address.zipcode FROM customer AS c
is valid but
SELECT address.zipcode FROM customer
it not valid.
public static final StructKind PEEK_FIELDS_DEFAULT
PEEK_FIELDS, but takes priority if another struct-typed
field also has a field of the name being sought.
In Phoenix, only one of a table's columns is labeled
PEEK_FIELDS_DEFAULT - the default column family - but in principle
there could be more than one.
public static final StructKind PEEK_FIELDS
For example, if address is labeled PEEK_FIELDS, you
could write zipcode as shorthand for address.zipcode.
public static final StructKind PEEK_FIELDS_NO_EXPAND
PEEK_FIELDS, but fields are not expanded in "SELECT *".
Used in Flink, not Phoenix.
public static StructKind[] values()
for (StructKind c : StructKind.values()) System.out.println(c);
public static StructKind valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.