graviti.dataframe.sql.operator
#
The search operators for type inference.
Module Contents#
Classes#
The class decorator to connect operator name and operator function. |
Functions#
|
Infer portex type from the Graviti criteria expr. |
|
Get portex type from the Graviti criteria expr. |
Attributes#
- class graviti.dataframe.sql.operator.OperatorRegister(*names)[source]#
The class decorator to connect operator name and operator function.
- Parameters
name – The name of the operator.
names (str) –
- graviti.dataframe.sql.operator.infer_type(schema, expr)[source]#
Infer portex type from the Graviti criteria expr.
- Parameters
schema (graviti.portex.PortexRecordBase) – The schema of the sheet.
expr (_Expr) – The Graviti criteria expr.
- Returns
The result portex type inferred from the expr.
- Raises
CriteriaError – When the operator is not supported.
- Return type
graviti.portex.PortexType
- graviti.dataframe.sql.operator.get_type(schema, expr)[source]#
Get portex type from the Graviti criteria expr.
- Parameters
schema (graviti.portex.PortexRecordBase) – The schema of the sheet.
expr (str) – The Graviti criteria expr.
- Returns
The result portex type inferred from the expr.
- Raises
CriteriaError – When the portex type cannot be get from the expr.
- Return type
graviti.portex.PortexType