diff options
author | Wenchen Fan <wenchen@databricks.com> | 2016-06-23 20:20:55 -0700 |
---|---|---|
committer | Herman van Hovell <hvanhovell@databricks.com> | 2016-06-23 20:20:55 -0700 |
commit | 6a3c6276f5cef26b0a4fef44c8ad99bbecfe006d (patch) | |
tree | 8eba70e6206821a4f569f5b1b1c1278848ad6d35 /sql/catalyst | |
parent | cc71d4fa372f6eb187c68dbd8358de4003ace3fe (diff) | |
download | spark-6a3c6276f5cef26b0a4fef44c8ad99bbecfe006d.tar.gz spark-6a3c6276f5cef26b0a4fef44c8ad99bbecfe006d.tar.bz2 spark-6a3c6276f5cef26b0a4fef44c8ad99bbecfe006d.zip |
[SQL][MINOR] ParserUtils.operationNotAllowed should throw exception directly
## What changes were proposed in this pull request?
It's weird that `ParserUtils.operationNotAllowed` returns an exception and the caller throw it.
## How was this patch tested?
N/A
Author: Wenchen Fan <wenchen@databricks.com>
Closes #13874 from cloud-fan/style.
Diffstat (limited to 'sql/catalyst')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala index 9619884ede..b04ce58e23 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala @@ -39,8 +39,8 @@ object ParserUtils { stream.getText(Interval.of(0, stream.size())) } - def operationNotAllowed(message: String, ctx: ParserRuleContext): ParseException = { - new ParseException(s"Operation not allowed: $message", ctx) + def operationNotAllowed(message: String, ctx: ParserRuleContext): Nothing = { + throw new ParseException(s"Operation not allowed: $message", ctx) } /** Check if duplicate keys exist in a set of key-value pairs. */ |