diff options
author | Jacek Laskowski <jacek@japila.pl> | 2016-07-22 12:37:30 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-07-22 12:37:30 +0100 |
commit | e1bd70f44b11141b000821e9754efeabc14f24a5 (patch) | |
tree | c2a5e9ddf53e4b80955707179489366ab9e4f76f | |
parent | 94f14b52a6a99047c0e30015d435bddb7f2b95fe (diff) | |
download | spark-e1bd70f44b11141b000821e9754efeabc14f24a5.tar.gz spark-e1bd70f44b11141b000821e9754efeabc14f24a5.tar.bz2 spark-e1bd70f44b11141b000821e9754efeabc14f24a5.zip |
[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.
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala | 6 |
1 files changed, 3 insertions, 3 deletions
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 b3c5c585c5..0ca715f424 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 { |