def __init__(self): """ Create a new context. """ # Storage for the registered tables self.tables = {} # Storage for the registered functions self.functions: Dict[str, Callable] = {} self.function_list: List[FunctionDescription] = [] # Storage for the registered aggregations self.aggregations = {} # Storage for the trained models self.models = {} # Name of the root schema (not changable so far) self.schema_name = "schema" # Register any default plugins, if nothing was registered before. RelConverter.add_plugin_class(logical.LogicalAggregatePlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalFilterPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalJoinPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalProjectPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalSortPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalTableScanPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalUnionPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalValuesPlugin, replace=False) RelConverter.add_plugin_class(logical.SamplePlugin, replace=False) RelConverter.add_plugin_class(custom.AnalyzeTablePlugin, replace=False) RelConverter.add_plugin_class(custom.CreateModelPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateTableAsPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateTablePlugin, replace=False) RelConverter.add_plugin_class(custom.PredictModelPlugin, replace=False) RelConverter.add_plugin_class(custom.DropModelPlugin, replace=False) RelConverter.add_plugin_class(custom.DropTablePlugin, replace=False) RelConverter.add_plugin_class(custom.ShowColumnsPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowSchemasPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowTablesPlugin, replace=False) RexConverter.add_plugin_class(core.RexCallPlugin, replace=False) RexConverter.add_plugin_class(core.RexInputRefPlugin, replace=False) RexConverter.add_plugin_class(core.RexLiteralPlugin, replace=False) InputUtil.add_plugin_class(input_utils.DaskInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.PandasInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.HiveInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.IntakeCatalogInputPlugin, replace=False) # needs to be the last entry, as it only checks for string InputUtil.add_plugin_class(input_utils.LocationInputPlugin, replace=False)
def __init__(self): """ Create a new context. """ # Storage for the registered tables self.tables = {} # Storage for the registered functions self.functions: Dict[str, Callable] = {} self.function_list: List[FunctionDescription] = [] # Storage for the registered aggregations self.aggregations = {} # Name of the root schema (not changable so far) self.schema_name = "schema" # Register any default plugins, if nothing was registered before. RelConverter.add_plugin_class(logical.LogicalAggregatePlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalFilterPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalJoinPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalProjectPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalSortPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalTableScanPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalUnionPlugin, replace=False) RelConverter.add_plugin_class(logical.LogicalValuesPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateAsPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateTablePlugin, replace=False) RelConverter.add_plugin_class(custom.ShowColumnsPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowSchemasPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowTablesPlugin, replace=False) RexConverter.add_plugin_class(core.RexCallPlugin, replace=False) RexConverter.add_plugin_class(core.RexInputRefPlugin, replace=False) RexConverter.add_plugin_class(core.RexLiteralPlugin, replace=False)
def __init__(self): """ Create a new context. """ # Name of the root schema self.schema_name = self.DEFAULT_SCHEMA_NAME # All schema information self.schema = {self.schema_name: SchemaContainer(self.schema_name)} # A started SQL server (useful for jupyter notebooks) self.sql_server = None # Register any default plugins, if nothing was registered before. RelConverter.add_plugin_class(logical.DaskAggregatePlugin, replace=False) RelConverter.add_plugin_class(logical.DaskFilterPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskJoinPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskLimitPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskProjectPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskSortPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskTableScanPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskUnionPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskValuesPlugin, replace=False) RelConverter.add_plugin_class(logical.DaskWindowPlugin, replace=False) RelConverter.add_plugin_class(logical.SamplePlugin, replace=False) RelConverter.add_plugin_class(custom.AnalyzeTablePlugin, replace=False) RelConverter.add_plugin_class(custom.CreateExperimentPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateModelPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateSchemaPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateTableAsPlugin, replace=False) RelConverter.add_plugin_class(custom.CreateTablePlugin, replace=False) RelConverter.add_plugin_class(custom.DropModelPlugin, replace=False) RelConverter.add_plugin_class(custom.DropSchemaPlugin, replace=False) RelConverter.add_plugin_class(custom.DropTablePlugin, replace=False) RelConverter.add_plugin_class(custom.ExportModelPlugin, replace=False) RelConverter.add_plugin_class(custom.PredictModelPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowColumnsPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowModelParamsPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowModelsPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowSchemasPlugin, replace=False) RelConverter.add_plugin_class(custom.ShowTablesPlugin, replace=False) RelConverter.add_plugin_class(custom.SwitchSchemaPlugin, replace=False) RelConverter.add_plugin_class(custom.AlterSchemaPlugin, replace=False) RelConverter.add_plugin_class(custom.AlterTablePlugin, replace=False) RelConverter.add_plugin_class(custom.DistributeByPlugin, replace=False) RexConverter.add_plugin_class(core.RexCallPlugin, replace=False) RexConverter.add_plugin_class(core.RexInputRefPlugin, replace=False) RexConverter.add_plugin_class(core.RexLiteralPlugin, replace=False) InputUtil.add_plugin_class(input_utils.DaskInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.PandasLikeInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.HiveInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.IntakeCatalogInputPlugin, replace=False) InputUtil.add_plugin_class(input_utils.SqlalchemyHiveInputPlugin, replace=False) # needs to be the last entry, as it only checks for string InputUtil.add_plugin_class(input_utils.LocationInputPlugin, replace=False)