spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [SPARK-16287][HOTFIX][BUILD][SQL] Fix annotation argument needs to be a constant
Date Fri, 22 Jul 2016 11:37:46 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-2.0 70bf8ce72 -> 0cc36cad1


[SPARK-16287][HOTFIX][BUILD][SQL] Fix annotation argument needs to be a constant

## What changes were proposed in this pull request?

Build fix for [SPARK-16287][SQL] Implement str_to_map SQL function that has introduced this
compilation error:

```
/Users/jacek/dev/oss/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala:402:
error: annotation argument needs to be a constant; found: "_FUNC_(text[, pairDelim, keyValueDelim])
- Creates a map after splitting the text ".+("into key/value pairs using delimiters. ").+("Default
delimiters are \',\' for pairDelim and \':\' for keyValueDelim.")
    "into key/value pairs using delimiters. " +
                                              ^
```

## How was this patch tested?

Local build

Author: Jacek Laskowski <jacek@japila.pl>

Closes #14315 from jaceklaskowski/build-fix-complexTypeCreator.

(cherry picked from commit e1bd70f44b11141b000821e9754efeabc14f24a5)
Signed-off-by: Sean Owen <sowen@cloudera.com>


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

Branch: refs/heads/branch-2.0
Commit: 0cc36cad1c6c1fbee6308f80178e9bbeebd4053a
Parents: 70bf8ce
Author: Jacek Laskowski <jacek@japila.pl>
Authored: Fri Jul 22 12:37:30 2016 +0100
Committer: Sean Owen <sowen@cloudera.com>
Committed: Fri Jul 22 12:37:41 2016 +0100

----------------------------------------------------------------------
 .../spark/sql/catalyst/expressions/complexTypeCreator.scala    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/0cc36cad/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
index b3c5c58..0ca715f 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
@@ -397,11 +397,11 @@ case class CreateNamedStructUnsafe(children: Seq[Expression]) extends
Expression
 /**
  * Creates a map after splitting the input text into key/value pairs using delimiters
  */
+// scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "_FUNC_(text[, pairDelim, keyValueDelim]) - Creates a map after splitting the text
" +
-    "into key/value pairs using delimiters. " +
-    "Default delimiters are ',' for pairDelim and ':' for keyValueDelim.",
+  usage = "_FUNC_(text[, pairDelim, keyValueDelim]) - Creates a map after splitting the text
into key/value pairs using delimiters. Default delimiters are ',' for pairDelim and ':' for
keyValueDelim.",
   extended = """ > SELECT _FUNC_('a:1,b:2,c:3',',',':');\n map("a":"1","b":"2","c":"3")
""")
+// scalastyle:on line.size.limit
 case class StringToMap(text: Expression, pairDelim: Expression, keyValueDelim: Expression)
   extends TernaryExpression with CodegenFallback with ExpectsInputTypes {
 


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


Mime
View raw message