You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/28 14:03:13 UTC

[GitHub] [spark] xuanyuanking opened a new pull request #28397: [SPARK-31519][SQL][BACKPORT-2.4] Cast in having aggregate expressions returns the wrong result

xuanyuanking opened a new pull request #28397:
URL: https://github.com/apache/spark/pull/28397


   ### What changes were proposed in this pull request?
   
   Add a new logical node AggregateWithHaving, and the parser should create this plan for HAVING. The analyzer resolves it to Filter(..., Aggregate(...)).
   
   ### Why are the changes needed?
   
   The SQL parser in Spark creates Filter(..., Aggregate(...)) for the HAVING query, and Spark has a special analyzer rule ResolveAggregateFunctions to resolve the aggregate functions and grouping columns in the Filter operator.
   
   It works for simple cases in a very tricky way as it relies on rule execution order:
   1. Rule ResolveReferences hits the Aggregate operator and resolves attributes inside aggregate functions, but the function itself is still unresolved as it's an UnresolvedFunction. This stops resolving the Filter operator as the child Aggrege operator is still unresolved.
   2. Rule ResolveFunctions resolves UnresolvedFunction. This makes the Aggrege operator resolved.
   3. Rule ResolveAggregateFunctions resolves the Filter operator if its child is a resolved Aggregate. This rule can correctly resolve the grouping columns.
   
   In the example query, I put a CAST, which needs to be resolved by rule ResolveTimeZone, which runs after ResolveAggregateFunctions. This breaks step 3 as the Aggregate operator is unresolved at that time. Then the analyzer starts next round and the Filter operator is resolved by ResolveReferences, which wrongly resolves the grouping columns.
   
   See the demo below:
   ```
   SELECT SUM(a) AS b, '2020-01-01' AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```
   The query's result is
   ```
   +---+----------+
   |  b|      fake|
   +---+----------+
   |  2|2020-01-01|
   +---+----------+
   ```
   But if we add CAST, it will return an empty result.
   ```
   SELECT SUM(a) AS b, CAST('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```
   
   ### Does this PR introduce any user-facing change?
   
   Yes, bug fix for cast in having aggregate expressions.
   
   ### How was this patch tested?
   
   New UT added.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621315744


   I'll update the PR description and merge this.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621189401






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620704036


   Hi, @xuanyuanking and @cloud-fan . Could you update the PR description appropriately because it's invalid in branch-2.4.
   ```
   scala> spark.version
   res7: String = 2.4.5
   
   scala> sql("SELECT SUM(a) AS b, CAST('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10").show
   +---+----------+
   |  b|      fake|
   +---+----------+
   |  2|2020-01-01|
   +---+----------+
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28397: [SPARK-31519][SQL][BACKPORT-2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620629358






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620804122


   Introducing `AggregateWithHaving` is elegant and nice, but the meaning of this PR seems to be different in `branch-2.4` from `branch-3.0`. It would be great if we have a proper PR title and PR description.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621188751


   **[Test build #122066 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122066/testReport)** for PR 28397 at commit [`e98f120`](https://github.com/apache/spark/commit/e98f120f6847c9a1c902d4855aa280bd49cb5c48).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620742055






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xuanyuanking commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
xuanyuanking commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621576788


   Great thanks for the verification! @dongjoon-hyun 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621320805


   cc @holdenk since this is a correctness issue since 2.2.x ~ 2.4.5.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620742055


   Merged build finished. Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620742059


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122001/
   Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xuanyuanking commented on pull request #28397: [SPARK-31519][SQL][BACKPORT-2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
xuanyuanking commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620629479


   cc @cloud-fan 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621320805


   cc @holdenk since this is a correctness issue for 2.2.x ~ 2.4.5.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xuanyuanking commented on a change in pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
xuanyuanking commented on a change in pull request #28397:
URL: https://github.com/apache/spark/pull/28397#discussion_r417299662



##########
File path: sql/core/src/test/resources/sql-tests/inputs/having.sql
##########
@@ -16,3 +16,6 @@ SELECT MIN(t.v) FROM (SELECT * FROM hav WHERE v > 0) t HAVING(COUNT(1) > 0);
 
 -- SPARK-20329: make sure we handle timezones correctly
 SELECT a + b FROM VALUES (1L, 2), (3L, 4) AS T(a, b) GROUP BY a + b HAVING a + b > 1;
+
+-- SPARK-31519: Cast in having aggregate expressions returns the wrong result
+SELECT SUM(a) AS b, CAST('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10

Review comment:
       Thanks for the verification, I used another test case and changed the description.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621315534






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28397:
URL: https://github.com/apache/spark/pull/28397#discussion_r417418086



##########
File path: sql/core/src/test/resources/sql-tests/inputs/having.sql
##########
@@ -16,3 +16,6 @@ SELECT MIN(t.v) FROM (SELECT * FROM hav WHERE v > 0) t HAVING(COUNT(1) > 0);
 
 -- SPARK-20329: make sure we handle timezones correctly
 SELECT a + b FROM VALUES (1L, 2), (3L, 4) AS T(a, b) GROUP BY a + b HAVING a + b > 1;
+
+-- SPARK-31519: Cast in having aggregate expressions returns the wrong result
+SELECT SUM(a) AS b, CAST('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10

Review comment:
       Thank you!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620740881


   **[Test build #122001 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122001/testReport)** for PR 28397 at commit [`de8da06`](https://github.com/apache/spark/commit/de8da064ac7e708646f0c4aea3e8c0f486a5a13c).
    * This patch **fails PySpark unit tests**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `case class AggregateWithHaving(`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621316320


   Thank you all!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621298912


   Ur, it seems a typo in new example of PR description. It's not working.
   ```
   SELECT SUM(a) AS b, hour('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```
   
   Your test code is
   ```
   SELECT SUM(a) AS b, hour('2020-01-01 12:12:12') AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620628606


   **[Test build #122001 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122001/testReport)** for PR 28397 at commit [`de8da06`](https://github.com/apache/spark/commit/de8da064ac7e708646f0c4aea3e8c0f486a5a13c).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28397: [SPARK-31519][SQL][BACKPORT-2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620629358






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620804122


   Introducing `AggregateWithHaving` is elegant and nice, but the meaning of this PR seems to be different in `branch-2.4`. It would be great if we have a proper PR title and PR description.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28397: [SPARK-31519][SQL][2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28397:
URL: https://github.com/apache/spark/pull/28397#discussion_r416934315



##########
File path: sql/core/src/test/resources/sql-tests/inputs/having.sql
##########
@@ -16,3 +16,6 @@ SELECT MIN(t.v) FROM (SELECT * FROM hav WHERE v > 0) t HAVING(COUNT(1) > 0);
 
 -- SPARK-20329: make sure we handle timezones correctly
 SELECT a + b FROM VALUES (1L, 2), (3L, 4) AS T(a, b) GROUP BY a + b HAVING a + b > 1;
+
+-- SPARK-31519: Cast in having aggregate expressions returns the wrong result
+SELECT SUM(a) AS b, CAST('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10

Review comment:
       Since this passes without this PR, can we have another valid test case to verify this PR?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621188751


   **[Test build #122066 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122066/testReport)** for PR 28397 at commit [`e98f120`](https://github.com/apache/spark/commit/e98f120f6847c9a1c902d4855aa280bd49cb5c48).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28397: [SPARK-31519][SQL][BACKPORT-2.4] Cast in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-620628606


   **[Test build #122001 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122001/testReport)** for PR 28397 at commit [`de8da06`](https://github.com/apache/spark/commit/de8da064ac7e708646f0c4aea3e8c0f486a5a13c).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621314457


   **[Test build #122066 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122066/testReport)** for PR 28397 at commit [`e98f120`](https://github.com/apache/spark/commit/e98f120f6847c9a1c902d4855aa280bd49cb5c48).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621298912


   Ur, it seems a typo in new example. It's not working.
   ```
   SELECT SUM(a) AS b, hour('2020-01-01' AS DATE) AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```
   
   Your test code is
   ```
   SELECT SUM(a) AS b, hour('2020-01-01 12:12:12') AS fake FROM VALUES (1, 10), (2, 20) AS T(a, b) GROUP BY b HAVING b > 10
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621315534






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28397: [SPARK-31519][SQL][2.4] Datetime functions in having aggregate expressions returns the wrong result

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28397:
URL: https://github.com/apache/spark/pull/28397#issuecomment-621189401






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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