Skip to content
Snippets Groups Projects
Commit 44165fc9 authored by wangfei's avatar wangfei Committed by Reynold Xin
Browse files

[SPARK-1826] fix the head notation of package object dsl

Author: wangfei <scnbwf@yeah.net>

Closes #765 from scwf/dslfix and squashes the following commits:

d2d1a9d [wangfei] Update package.scala
66ff53b [wangfei] fix the head notation of package object dsl
parent 9ad096d5
No related branches found
No related tags found
No related merge requests found
......@@ -31,26 +31,29 @@ import org.apache.spark.sql.catalyst.types._
* A collection of implicit conversions that create a DSL for constructing catalyst data structures.
*
* {{{
* scala> import catalyst.dsl._
* scala> import org.apache.spark.sql.catalyst.dsl.expressions._
*
* // Standard operators are added to expressions.
* scala> import org.apache.spark.sql.catalyst.expressions.Literal
* scala> Literal(1) + Literal(1)
* res1: catalyst.expressions.Add = (1 + 1)
* res0: org.apache.spark.sql.catalyst.expressions.Add = (1 + 1)
*
* // There is a conversion from 'symbols to unresolved attributes.
* scala> 'a.attr
* res2: catalyst.analysis.UnresolvedAttribute = 'a
* res1: org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute = 'a
*
* // These unresolved attributes can be used to create more complicated expressions.
* scala> 'a === 'b
* res3: catalyst.expressions.Equals = ('a = 'b)
* res2: org.apache.spark.sql.catalyst.expressions.Equals = ('a = 'b)
*
* // SQL verbs can be used to construct logical query plans.
* scala> TestRelation('key.int, 'value.string).where('key === 1).select('value).analyze
* res4: catalyst.plans.logical.LogicalPlan =
* Project {value#1}
* Filter (key#0 = 1)
* TestRelation {key#0,value#1}
* scala> import org.apache.spark.sql.catalyst.plans.logical._
* scala> import org.apache.spark.sql.catalyst.dsl.plans._
* scala> LocalRelation('key.int, 'value.string).where('key === 1).select('value).analyze
* res3: org.apache.spark.sql.catalyst.plans.logical.LogicalPlan =
* Project [value#3]
* Filter (key#2 = 1)
* LocalRelation [key#2,value#3], []
* }}}
*/
package object dsl {
......
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