Skip to content
Snippets Groups Projects
Commit 7f6e3ec7 authored by Reynold Xin's avatar Reynold Xin
Browse files

[SPARK-13138][SQL] Add "logical" package prefix for ddl.scala

ddl.scala is defined in the execution package, and yet its reference of "UnaryNode" and "Command" are logical. This was fairly confusing when I was trying to understand the ddl code.

Author: Reynold Xin <rxin@databricks.com>

Closes #11021 from rxin/SPARK-13138.
parent b1835d72
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,8 @@ package org.apache.spark.sql.execution.datasources
import org.apache.spark.sql.{DataFrame, Row, SaveMode, SQLContext}
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference}
import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.catalyst.plans.logical
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.execution.RunnableCommand
import org.apache.spark.sql.types._
......@@ -32,7 +33,7 @@ import org.apache.spark.sql.types._
*/
case class DescribeCommand(
table: LogicalPlan,
isExtended: Boolean) extends LogicalPlan with Command {
isExtended: Boolean) extends LogicalPlan with logical.Command {
override def children: Seq[LogicalPlan] = Seq.empty
......@@ -59,7 +60,7 @@ case class CreateTableUsing(
temporary: Boolean,
options: Map[String, String],
allowExisting: Boolean,
managedIfNoPath: Boolean) extends LogicalPlan with Command {
managedIfNoPath: Boolean) extends LogicalPlan with logical.Command {
override def output: Seq[Attribute] = Seq.empty
override def children: Seq[LogicalPlan] = Seq.empty
......@@ -67,8 +68,8 @@ case class CreateTableUsing(
/**
* A node used to support CTAS statements and saveAsTable for the data source API.
* This node is a [[UnaryNode]] instead of a [[Command]] because we want the analyzer
* can analyze the logical plan that will be used to populate the table.
* This node is a [[logical.UnaryNode]] instead of a [[logical.Command]] because we want the
* analyzer can analyze the logical plan that will be used to populate the table.
* So, [[PreWriteCheck]] can detect cases that are not allowed.
*/
case class CreateTableUsingAsSelect(
......@@ -79,7 +80,7 @@ case class CreateTableUsingAsSelect(
bucketSpec: Option[BucketSpec],
mode: SaveMode,
options: Map[String, String],
child: LogicalPlan) extends UnaryNode {
child: LogicalPlan) extends logical.UnaryNode {
override def output: Seq[Attribute] = Seq.empty[Attribute]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment