Dialect

Struct Dialect 

Source
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 Clone for Dialect

Source§

fn clone(&self) -> Dialect

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dialect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dialect

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Dialect

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Dialect> for Dialect

Source§

fn from(value: &Dialect) -> Self

Converts to this type from the input type.
Source§

impl From<Dialect> for Dialect

Source§

fn from(value: Dialect) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Dialect

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Dialect> for Dialect

Source§

type Error = ConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Dialect) -> Result<Self, ConversionError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,