You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/07/22 11:37:35 UTC
spark git commit: [SPARK-16287][HOTFIX][BUILD][SQL] Fix annotation
argument needs to be a constant
Repository: spark
Updated Branches:
refs/heads/master 94f14b52a -> e1bd70f44
[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 <ja...@japila.pl>
Closes #14315 from jaceklaskowski/build-fix-complexTypeCreator.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e1bd70f4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e1bd70f4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e1bd70f4
Branch: refs/heads/master
Commit: e1bd70f44b11141b000821e9754efeabc14f24a5
Parents: 94f14b5
Author: Jacek Laskowski <ja...@japila.pl>
Authored: Fri Jul 22 12:37:30 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Jul 22 12:37:30 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/e1bd70f4/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