You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jan-Ole Sasse (Jira)" <ji...@apache.org> on 2022/05/23 16:05:00 UTC
[jira] [Created] (SPARK-39259) Timestamps returned by now() and equivalent functions are not consistent in subqueries
Jan-Ole Sasse created SPARK-39259:
-------------------------------------
Summary: Timestamps returned by now() and equivalent functions are not consistent in subqueries
Key: SPARK-39259
URL: https://issues.apache.org/jira/browse/SPARK-39259
Project: Spark
Issue Type: Bug
Components: Optimizer
Affects Versions: 3.2.1
Environment: Reproduced in the Spark Shell on the current 3.4.0 snapshot
Reporter: Jan-Ole Sasse
Timestamp evaluation in not consistent across subqueries. As an example for the Spark Shell
{code:java}
sql("SELECT * FROM (SELECT 1) WHERE now() IN (SELECT now())").collect() {code}
Returns an empty result.
The root cause is that [ComputeCurrentTime|https://github.com/apache/spark/blob/c91c2e9afec0d5d5bbbd2e155057fe409c5bb928/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala#L74] does not iterate into subqueries
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org