spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: [SQL] Add String option for DSL AS
Date Wed, 05 Nov 2014 02:14:58 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.2 b90451814 -> e5c7869f2


[SQL] Add String option for DSL AS

Author: Michael Armbrust <michael@databricks.com>

Closes #3097 from marmbrus/asString and squashes the following commits:

6430520 [Michael Armbrust] Add String option for DSL AS

(cherry picked from commit 515abb9afa2d6b58947af6bb079a493b49d315ca)
Signed-off-by: Xiangrui Meng <meng@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e5c7869f
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e5c7869f
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e5c7869f

Branch: refs/heads/branch-1.2
Commit: e5c7869f20139832ad9e636eaeb5e77da7297456
Parents: b904518
Author: Michael Armbrust <michael@databricks.com>
Authored: Tue Nov 4 18:14:28 2014 -0800
Committer: Xiangrui Meng <meng@databricks.com>
Committed: Tue Nov 4 18:14:48 2014 -0800

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/sql/catalyst/dsl/package.scala    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e5c7869f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
index 3314e15..31dc5a5 100755
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
@@ -110,7 +110,8 @@ package object dsl {
     def asc = SortOrder(expr, Ascending)
     def desc = SortOrder(expr, Descending)
 
-    def as(s: Symbol) = Alias(expr, s.name)()
+    def as(alias: String) = Alias(expr, alias)()
+    def as(alias: Symbol) = Alias(expr, alias.name)()
   }
 
   trait ExpressionConversions {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message