Enum StructKind
- All Implemented Interfaces:
Serializable
,Comparable<StructKind>
,Constable
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:
- Shorter. If you write
zipcode
,address.zipcode
will be preferred overproduct.supplier.zipcode
. - Uses as little skipping as possible. A match that is fully-qualified
will beat one that uses
PEEK_FIELDS_DEFAULT
at some point, which will beat one that usesPEEK_FIELDS
at some point.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis is a traditional structured type, where each field must be referenced explicitly.This is not a structured type.If a field has this type, you can see its fields without qualifying them with the name of this field.AsPEEK_FIELDS
, but takes priority if another struct-typed field also has a field of the name being sought.AsPEEK_FIELDS
, but fields are not expanded in "SELECT *". -
Method Summary
Modifier and TypeMethodDescriptionstatic StructKind
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.
-
Enum Constant Details
-
NONE
This is not a structured type. -
FULLY_QUALIFIED
This is a traditional structured type, where each field must be referenced explicitly.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 butSELECT address.zipcode FROM customer
it not valid. -
PEEK_FIELDS_DEFAULT
AsPEEK_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. -
PEEK_FIELDS
If a field has this type, you can see its fields without qualifying them with the name of this field.For example, if
address
is labeledPEEK_FIELDS
, you could writezipcode
as shorthand foraddress.zipcode
. -
PEEK_FIELDS_NO_EXPAND
AsPEEK_FIELDS
, but fields are not expanded in "SELECT *".Used in Flink, not Phoenix.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-