pub struct Dialect {
pub dependencies: HashMap<String, String>,
pub name: Option<String>,
pub supported_aggregate_functions: Vec<DialectFunction>,
pub supported_expressions: Option<Vec<DialectSupportedExpressionsItem>>,
pub supported_relations: Option<Vec<DialectSupportedRelationsItem>>,
pub supported_scalar_functions: Vec<DialectFunction>,
pub supported_types: Option<Vec<DialectSupportedTypesItem>>,
pub supported_window_functions: Vec<DialectFunction>,
}
Expand description
Dialect
JSON schema
{
"$id": "http://substrait.io/schemas/dialect",
"title": "Dialect",
"type": "object",
"properties": {
"dependencies": {
"description": "A map of extension files depended on by this dialect. Keys are aliases for extensions, which are used within the dialect. Values are URNs.\n",
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "string"
}
},
"name": {
"description": "Optional name of the dialect (e.g., \"MySQL\", \"PostgreSQL\", \"Spark\").",
"type": "string"
},
"supported_aggregate_functions": {
"description": "Functions that aggregate multiple rows into a single result.",
"type": "array",
"items": {
"$ref": "#/definitions/dialect_function"
}
},
"supported_expressions": {
"description": "Expressions that are supported by this dialect. If not present or empty, all expressions are supported.\n",
"type": "array",
"items": {
"oneOf": [
{
"enum": [
"LITERAL",
"SELECTION",
"SCALAR_FUNCTION",
"WINDOW_FUNCTION",
"IF_THEN",
"SWITCH",
"SINGULAR_OR_LIST",
"MULTI_OR_LIST",
"CAST",
"SUBQUERY",
"NESTED",
"DYNAMIC_PARAMETER"
]
},
{
"$ref": "#/definitions/literal_expression"
},
{
"$ref": "#/definitions/selection_expression"
},
{
"$ref": "#/definitions/scalar_function_expression"
},
{
"$ref": "#/definitions/window_function_expression"
},
{
"$ref": "#/definitions/if_then_expression"
},
{
"$ref": "#/definitions/switch_expression"
},
{
"$ref": "#/definitions/singular_or_list_expression"
},
{
"$ref": "#/definitions/multi_or_list_expression"
},
{
"$ref": "#/definitions/cast_expression"
},
{
"$ref": "#/definitions/subquery_expression"
},
{
"$ref": "#/definitions/nested_expression"
},
{
"$ref": "#/definitions/dynamic_parameter_expression"
}
]
},
"uniqueItems": true
},
"supported_relations": {
"description": "Relations that are supported by this dialect. If not present or empty, all relations are supported.\n",
"type": "array",
"items": {
"oneOf": [
{
"enum": [
"READ",
"FILTER",
"FETCH",
"AGGREGATE",
"SORT",
"JOIN",
"PROJECT",
"SET",
"CROSS",
"REFERENCE",
"WRITE",
"DDL",
"UPDATE",
"HASH_JOIN",
"MERGE_JOIN",
"NESTED_LOOP_JOIN",
"CONSISTENT_PARTITION_WINDOW",
"EXCHANGE",
"EXPAND"
]
},
{
"$ref": "#/definitions/read_relation"
},
{
"$ref": "#/definitions/filter_relation"
},
{
"$ref": "#/definitions/fetch_relation"
},
{
"$ref": "#/definitions/aggregate_relation"
},
{
"$ref": "#/definitions/sort_relation"
},
{
"$ref": "#/definitions/join_relation"
},
{
"$ref": "#/definitions/project_relation"
},
{
"$ref": "#/definitions/set_relation"
},
{
"$ref": "#/definitions/extension_single_relation"
},
{
"$ref": "#/definitions/extension_multi_relation"
},
{
"$ref": "#/definitions/extension_leaf_relation"
},
{
"$ref": "#/definitions/cross_relation"
},
{
"$ref": "#/definitions/reference_relation"
},
{
"$ref": "#/definitions/write_relation"
},
{
"$ref": "#/definitions/ddl_relation"
},
{
"$ref": "#/definitions/update_relation"
},
{
"$ref": "#/definitions/hash_join_relation"
},
{
"$ref": "#/definitions/merge_join_relation"
},
{
"$ref": "#/definitions/nested_loop_join_relation"
},
{
"$ref": "#/definitions/consistent_partition_window_relation"
},
{
"$ref": "#/definitions/exchange_relation"
},
{
"$ref": "#/definitions/expand_relation"
}
]
},
"uniqueItems": true
},
"supported_scalar_functions": {
"description": "Regular functions that operate on scalar values.",
"type": "array",
"items": {
"$ref": "#/definitions/dialect_function"
}
},
"supported_types": {
"description": "Types that are supported by this dialect. If not present or empty, all standard types are supported.\n",
"type": "array",
"items": {
"oneOf": [
{
"enum": [
"BOOL",
"I8",
"I16",
"I32",
"I64",
"FP32",
"FP64",
"BINARY",
"FIXED_BINARY",
"STRING",
"VARCHAR",
"FIXED_CHAR",
"PRECISION_TIME",
"PRECISION_TIMESTAMP",
"PRECISION_TIMESTAMP_TZ",
"DATE",
"TIME",
"INTERVAL_COMPOUND",
"INTERVAL_DAY",
"INTERVAL_YEAR",
"UUID",
"DECIMAL",
"STRUCT",
"LIST",
"MAP"
]
},
{
"$ref": "#/definitions/type_bool"
},
{
"$ref": "#/definitions/type_i8"
},
{
"$ref": "#/definitions/type_i16"
},
{
"$ref": "#/definitions/type_i32"
},
{
"$ref": "#/definitions/type_i64"
},
{
"$ref": "#/definitions/type_fp32"
},
{
"$ref": "#/definitions/type_fp64"
},
{
"$ref": "#/definitions/type_binary"
},
{
"$ref": "#/definitions/type_fixed_binary"
},
{
"$ref": "#/definitions/type_string"
},
{
"$ref": "#/definitions/type_varchar"
},
{
"$ref": "#/definitions/type_fixed_char"
},
{
"$ref": "#/definitions/type_precision_time"
},
{
"$ref": "#/definitions/type_precision_timestamp"
},
{
"$ref": "#/definitions/type_precision_timestamp_tz"
},
{
"$ref": "#/definitions/type_date"
},
{
"$ref": "#/definitions/type_time"
},
{
"$ref": "#/definitions/type_interval_compound"
},
{
"$ref": "#/definitions/type_interval_day"
},
{
"$ref": "#/definitions/type_interval_year"
},
{
"$ref": "#/definitions/type_uuid"
},
{
"$ref": "#/definitions/type_decimal"
},
{
"$ref": "#/definitions/type_struct"
},
{
"$ref": "#/definitions/type_list"
},
{
"$ref": "#/definitions/type_map"
},
{
"$ref": "#/definitions/type_user_defined"
}
]
},
"uniqueItems": true
},
"supported_window_functions": {
"description": "Functions that operate over a window of rows.",
"type": "array",
"items": {
"$ref": "#/definitions/dialect_function"
}
}
},
"additionalProperties": false
}
Fields§
§dependencies: HashMap<String, String>
A map of extension files depended on by this dialect. Keys are aliases for extensions, which are used within the dialect. Values are URNs.
name: Option<String>
Optional name of the dialect (e.g., “MySQL”, “PostgreSQL”, “Spark”).
supported_aggregate_functions: Vec<DialectFunction>
Functions that aggregate multiple rows into a single result.
supported_expressions: Option<Vec<DialectSupportedExpressionsItem>>
Expressions that are supported by this dialect. If not present or empty, all expressions are supported.
supported_relations: Option<Vec<DialectSupportedRelationsItem>>
Relations that are supported by this dialect. If not present or empty, all relations are supported.
supported_scalar_functions: Vec<DialectFunction>
Regular functions that operate on scalar values.
supported_types: Option<Vec<DialectSupportedTypesItem>>
Types that are supported by this dialect. If not present or empty, all standard types are supported.
supported_window_functions: Vec<DialectFunction>
Functions that operate over a window of rows.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dialect
impl<'de> Deserialize<'de> for Dialect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnwindSafe for Dialect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more