DataSourceAnalysis PostHoc Logical Resolution Rule

DataSourceAnalysis is a posthoc logical resolution rule that the default and Hive-specific logical query plan analyzers use to FIXME.

Table 1. DataSourceAnalysis’s Logical Resolutions (Conversions)
Source Operator Target Operator Description

CreateTable (isDatasourceTable + no query)

CreateDataSourceTableCommand

CreateTable (isDatasourceTable + a resolved query)

CreateDataSourceTableAsSelectCommand

InsertIntoTable with InsertableRelation

InsertIntoDataSourceCommand

InsertIntoDir (non-hive provider)

InsertIntoDataSourceDirCommand

InsertIntoTable with HadoopFsRelation

InsertIntoHadoopFsRelationCommand

Technically, DataSourceAnalysis is a Catalyst rule for transforming logical plans, i.e. Rule[LogicalPlan].

// FIXME Example of DataSourceAnalysis
import org.apache.spark.sql.execution.datasources.DataSourceAnalysis
val rule = DataSourceAnalysis(spark.sessionState.conf)

val plan = FIXME

rule(plan)

Executing Rule — apply Method

apply(plan: LogicalPlan): LogicalPlan
Note
apply is part of the Rule Contract to execute (apply) a rule on a TreeNode (e.g. LogicalPlan).

apply…​FIXME

results matching ""

    No results matching ""