public class FlinkSqlNameMatcher extends Object implements org.apache.calcite.sql.validate.SqlNameMatcher
The SqlNameMatcher
is used in SqlValidatorImpl
when deriving a type of a
nested field of a Table. E.g SELECT `row`.`nested` FROM table
. See field(RelDataType, String)
for more information.
Constructor and Description |
---|
FlinkSqlNameMatcher(org.apache.calcite.sql.validate.SqlNameMatcher baseMatcher,
org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) |
Modifier and Type | Method and Description |
---|---|
String |
bestString() |
Set<String> |
createSet() |
org.apache.calcite.rel.type.RelDataTypeField |
field(org.apache.calcite.rel.type.RelDataType rowType,
String fieldName)
Compared to the original method we adjust the nullability of the nested column based on the
nullability of the enclosing type.
|
int |
frequency(Iterable<String> names,
String name) |
<K extends List<String>,V> |
get(Map<K,V> map,
List<String> prefixNames,
List<String> names) |
boolean |
isCaseSensitive() |
boolean |
matches(String string,
String name) |
public FlinkSqlNameMatcher(org.apache.calcite.sql.validate.SqlNameMatcher baseMatcher, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
public boolean isCaseSensitive()
isCaseSensitive
in interface org.apache.calcite.sql.validate.SqlNameMatcher
public boolean matches(String string, String name)
matches
in interface org.apache.calcite.sql.validate.SqlNameMatcher
public <K extends List<String>,V> V get(Map<K,V> map, List<String> prefixNames, List<String> names)
get
in interface org.apache.calcite.sql.validate.SqlNameMatcher
public String bestString()
bestString
in interface org.apache.calcite.sql.validate.SqlNameMatcher
public org.apache.calcite.rel.type.RelDataTypeField field(org.apache.calcite.rel.type.RelDataType rowType, String fieldName)
If the fields type is NOT NULL, but the enclosing ROW is nullable we still can produce nulls.
field
in interface org.apache.calcite.sql.validate.SqlNameMatcher
public int frequency(Iterable<String> names, String name)
frequency
in interface org.apache.calcite.sql.validate.SqlNameMatcher
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.