SqlGraphRegistrationContext¶
Creating Instance¶
SqlGraphRegistrationContext
takes the following to be created:
SqlGraphRegistrationContext
is created when:
PipelinesHandler
(Spark Connect) is requested to handle DEFINE_SQL_GRAPH_ELEMENTS command (and defineSqlGraphElements)SqlGraphRegistrationContext
is requested to processSqlFile
processSqlFile¶
processSqlFile(
sqlText: String,
sqlFilePath: String,
spark: SparkSession): Unit
processSqlFile
creates a SqlGraphRegistrationContext for this GraphRegistrationContext.
Warning
Why does processSqlFile
creates a brand new SqlGraphRegistrationContext for the same GraphRegistrationContext it is executed with?!
processSqlFile
splitSqlFileIntoQueries followed by processSqlQuery for every query (a LogicalPlan
).
processSqlFile
is used when:
PipelinesHandler
(Spark Connect) is requested to defineSqlGraphElements
processSqlQuery¶
processSqlQuery(
queryPlan: LogicalPlan,
queryOrigin: QueryOrigin): Unit
processSqlQuery
handles (processes) the given LogicalPlan
query plan:
SetCommand
SetNamespaceCommand
SetCatalogCommand
CreateView
CreateViewCommand
CreateMaterializedViewAsSelect
CreateStreamingTableAsSelect
CreateStreamingTable
CreateFlowCommand
splitSqlFileIntoQueries¶
splitSqlFileIntoQueries(
spark: SparkSession,
sqlFileText: String,
sqlFilePath: String): Seq[SqlQueryPlanWithOrigin]
splitSqlFileIntoQueries
...FIXME