[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-03 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/18869


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-03 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136709446
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/PredicateSuite.scala
 ---
@@ -151,29 +151,63 @@ class PredicateSuite extends SparkFunSuite with 
ExpressionEvalHelper {
 checkEvaluation(In(Literal("^Ba*n"), Seq(Literal("aa"), 
Literal("^Ba*n"))), true)
 checkEvaluation(In(Literal("^Ba*n"), Seq(Literal("aa"), 
Literal("^n"))), false)
 
-val primitiveTypes = Seq(IntegerType, FloatType, DoubleType, 
StringType, ByteType, ShortType,
-  LongType, BinaryType, BooleanType, DecimalType.USER_DEFAULT, 
TimestampType)
-primitiveTypes.foreach { t =>
-  val dataGen = RandomDataGenerator.forType(t, nullable = true).get
-  val inputData = Seq.fill(10) {
-val value = dataGen.apply()
-value match {
-  case d: Double if d.isNaN => 0.0d
-  case f: Float if f.isNaN => 0.0f
-  case _ => value
+  }
+
+  test("IN with different types") {
+def testWithRandomDataGeneration(dataType: DataType, nullable: 
Boolean): Unit = {
+  val dataGen = RandomDataGenerator.forType(dataType, nullable = 
nullable)
+  if (dataGen.isDefined) {
--- End diff --

Although I already filter out the unsupported data types when constructing 
`atomicTypes`, this is no harm. So ok for me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-03 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136709144
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/PredicateSuite.scala
 ---
@@ -151,29 +151,63 @@ class PredicateSuite extends SparkFunSuite with 
ExpressionEvalHelper {
 checkEvaluation(In(Literal("^Ba*n"), Seq(Literal("aa"), 
Literal("^Ba*n"))), true)
 checkEvaluation(In(Literal("^Ba*n"), Seq(Literal("aa"), 
Literal("^n"))), false)
 
-val primitiveTypes = Seq(IntegerType, FloatType, DoubleType, 
StringType, ByteType, ShortType,
-  LongType, BinaryType, BooleanType, DecimalType.USER_DEFAULT, 
TimestampType)
-primitiveTypes.foreach { t =>
-  val dataGen = RandomDataGenerator.forType(t, nullable = true).get
-  val inputData = Seq.fill(10) {
-val value = dataGen.apply()
-value match {
-  case d: Double if d.isNaN => 0.0d
-  case f: Float if f.isNaN => 0.0f
-  case _ => value
+  }
+
+  test("IN with different types") {
+def testWithRandomDataGeneration(dataType: DataType, nullable: 
Boolean): Unit = {
+  val dataGen = RandomDataGenerator.forType(dataType, nullable = 
nullable)
+  if (dataGen.isDefined) {
--- End diff --

If the data type is not supported, it will silently skip the test. We do 
something like
```Scala
  val maybeDataGen = RandomDataGenerator.forType(dataType, nullable = 
nullable)
  val dataGen = maybeDataGen.getOrElse(fail(s"Failed to create data 
generator for type $dataType"))
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-02 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136706140
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
+select 1 in(1, 2, 3);
+select 1 in(2, 3, 4);
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 1), 
named_struct('a', 1, 'b', 3));
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 2), 
named_struct('a', 1, 'b', 3));
--- End diff --

Looks like the existing test for `In` is not well covered. We should 
improve it. I will commit the tests I added locally.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-02 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136706025
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
--- End diff --

The test cases should be added along with the actual code changes such as 
#18818 that changes the underlying semantics.

For example, I saw there are tests added to test map is not supported by 
#18818: 
https://github.com/apache/spark/blob/cba69aeb453d2489830f3e6e0473a64dee81989e/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala#L112-L122

More tests are always good and not harm, I agreed. If the necessary tests 
are not added before, we should add and improve them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-02 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136704544
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
--- End diff --

Let me explain it a little bit more. No need to add more and more test 
cases in this PR. We need to ensure anything claimed in the descriptions is 
well tested; if no test case exists, we need to add it into this PR. It should 
include both negative and positive test cases. For example, map is not 
supported; and then this needs to be documented and tested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-02 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136704469
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
+select 1 in(1, 2, 3);
+select 1 in(2, 3, 4);
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 1), 
named_struct('a', 1, 'b', 3));
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 2), 
named_struct('a', 1, 'b', 3));
+
+-- EqualTo
+select 1 = 1;
+select 1 = '1';
+select 1.0 = '1';
+
+-- GreaterThan
+select 1 > '1';
--- End diff --

For the test cases that trigger implicit type casting, we can keep them 
here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-02 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136704438
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
--- End diff --

If we do not have a test case, how can we know the description is correct?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-01 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136689620
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
+select 1 in(1, 2, 3);
+select 1 in(2, 3, 4);
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 1), 
named_struct('a', 1, 'b', 3));
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 2), 
named_struct('a', 1, 'b', 3));
--- End diff --

For `In`, I've complemented its test coverage in `PredicateSuite` and use 
`checkEvaluation`. I'd prefer to have it in a following PR if you don't insist 
to add it here. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-01 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136689567
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
+select 1 in(1, 2, 3);
+select 1 in(2, 3, 4);
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 1), 
named_struct('a', 1, 'b', 3));
+select named_struct('a', 1, 'b', 2) in(named_struct('a', 1, 'b', 2), 
named_struct('a', 1, 'b', 3));
+
+-- EqualTo
+select 1 = 1;
+select 1 = '1';
+select 1.0 = '1';
+
+-- GreaterThan
+select 1 > '1';
--- End diff --

The following test cases are intended to test the end-to-end comparison 
between different types. It doesn't make much sense to re-write them with 
`checkEvaluation`. We'd have something like 
`checkEvaluation(GreaterThan(Cast(...), ...), true)` by manually added `Cast`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-01 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136689245
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
--- End diff --

Actually I feel the test coverage might be out of the scope of this PR a 
little bit. This PR is for the expression description. If you don't insist we 
add test here together, I'd like to submit other PR to improve the test 
coverage.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-09-01 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r136616723
  
--- Diff: 
sql/core/src/test/resources/sql-tests/inputs/predicate-functions.sql ---
@@ -0,0 +1,42 @@
+-- In
--- End diff --

Could we move these to `PredicateSuite` and then we can use 
`checkEvaluation`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-08 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r132088990
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -564,8 +611,27 @@ case class EqualNullSafe(left: Expression, right: 
Expression) extends BinaryComp
   }
 }
 
+// scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is less than 
`expr2`.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is less than 
`expr2`.",
+  arguments = """
+Arguments:
+  * expr1, expr2 - the two expressions must be same type or can be 
casted to a common type, and must be a type that can be ordered/compared.
--- End diff --

Thanks. Fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-08 Thread HyukjinKwon
Github user HyukjinKwon commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r132088507
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -564,8 +611,27 @@ case class EqualNullSafe(left: Expression, right: 
Expression) extends BinaryComp
   }
 }
 
+// scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is less than 
`expr2`.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is less than 
`expr2`.",
+  arguments = """
+Arguments:
+  * expr1, expr2 - the two expressions must be same type or can be 
casted to a common type, and must be a type that can be ordered/compared.
--- End diff --

@viirya, BTW, I think we could also do this as below:

```diff
-  * expr1, expr2 - the two expressions must be same type or can be 
casted to a common type, and must be a type that can be ordered/compared.
+  * expr1, expr2 - the two expressions must be same type or can be 
casted to a common type,
+  and must be a type that can be ordered/compared.
```

Just double checked it renders fine in the doc as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-08 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r132084124
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -484,7 +501,20 @@ object Equality {
 }
 
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.",
+  arguments = """
+Arguments:
+  * expr1, expr2 - the two expressions must be same type.
--- End diff --

I've modified the statement.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-08 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r132081911
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -484,7 +501,20 @@ object Equality {
 }
 
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.",
+  arguments = """
+Arguments:
+  * expr1, expr2 - the two expressions must be same type.
--- End diff --

Right. The rule `ImplicitTypeCasts` will specially do type casting for 
`BinaryOperator`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-08 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r131841212
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -600,8 +694,25 @@ case class GreaterThan(left: Expression, right: 
Expression)
   protected override def nullSafeEval(input1: Any, input2: Any): Any = 
ordering.gt(input1, input2)
 }
 
+// scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is greater than or 
equal to `expr2`.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is greater than 
`expr2`.",
--- End diff --

Thanks. Fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-07 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r131754182
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -484,7 +501,20 @@ object Equality {
 }
 
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` equals `expr2`, or 
false otherwise.",
+  arguments = """
+Arguments:
+  * expr1, expr2 - the two expressions must be same type.
--- End diff --

Regarding the type issues, could you check whether this statement is true? 
I think we can support different types. 
```SQL
SELECT 1 = '1'
```
This will return true.

Also, could you add a test case? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-07 Thread HyukjinKwon
Github user HyukjinKwon commented on a diff in the pull request:

https://github.com/apache/spark/pull/18869#discussion_r131638244
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
@@ -600,8 +694,25 @@ case class GreaterThan(left: Expression, right: 
Expression)
   protected override def nullSafeEval(input1: Any, input2: Any): Any = 
ordering.gt(input1, input2)
 }
 
+// scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is greater than or 
equal to `expr2`.")
+  usage = "expr1 _FUNC_ expr2 - Returns true if `expr1` is greater than 
`expr2`.",
--- End diff --

Looks there is a typo, missing `or equal to`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #18869: [SPARK-21654][SQL] Complement SQL predicates expr...

2017-08-07 Thread viirya
GitHub user viirya opened a pull request:

https://github.com/apache/spark/pull/18869

[SPARK-21654][SQL] Complement SQL predicates expression description

## What changes were proposed in this pull request?

SQL predicates don't have complete expression description. This patch goes 
to complement the description by adding arguments, examples.

## How was this patch tested?

Existing tests.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/viirya/spark-1 SPARK-21654

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/18869.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #18869


commit abfa86739735cc8d4079a0b16a89e0c728cd31f3
Author: Liang-Chi Hsieh 
Date:   2017-08-07T08:41:46Z

Complement SQL predicates document.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org