Skip to content

SqlGraphRegistrationContext

Creating Instance

SqlGraphRegistrationContext takes the following to be created:

SqlGraphRegistrationContext is created when:

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:

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