public final class StructuredSchemaParser extends Object
StructuredSchemaDialect.SPARK_SQL_TYPE_STRING:
type := primitive | array | struct | map
array := ARRAY '<' type '>'
struct := STRUCT '<' field (',' field)* '>'
field := identifier ':' type
map := MAP '<' type ',' type '>'
primitive := STRING | INT | BIGINT | DOUBLE | FLOAT | BOOLEAN | DATE
| TIMESTAMP | DECIMAL ('(' ... ')')? | identifier
identifier := backquoted_identifier | bare_identifier
Inputs may include one layer of surrounding single or double quotes
(matching the SQL string literal); they are stripped before parsing, and
doubled quotes ('') inside the literal are unescaped to a single
quote.
| Modifier and Type | Method and Description |
|---|---|
static StructuredType |
parse(String schemaText,
StructuredSchemaDialect dialect) |
public static StructuredType parse(String schemaText, StructuredSchemaDialect dialect)