[ 
https://issues.apache.org/jira/browse/SPARK-31474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17088704#comment-17088704
 ] 

Jason Darrell Lowe commented on SPARK-31474:
--------------------------------------------

The branch-3.0 build appears to have been broken by this commit.
{noformat}
[INFO] --- scala-maven-plugin:4.3.0:compile (scala-compile-first) @ 
spark-catalyst_2.12 ---
[INFO] Using incremental compilation using Mixed compile order
[INFO] Compiler bridge file: 
/home/user/.sbt/1.0/zinc/org.scala-sbt/org.scala-sbt-compiler-bridge_2.12-1.3.1-bin_2.12.10__52.0-1.3.1_20191012T045515.jar
[INFO] Compiling 304 Scala sources and 98 Java sources to 
/home/user/src/spark/sql/catalyst/target/scala-2.12/classes ...
[ERROR] [Error] 
/home/user/src/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala:140:
 not found: type Timestamp
[ERROR] one error found
{noformat}

The patch removes the {{Timestamp}} import from datetimeExpressions.scala but 
there are still references to that type within the file.  [~cloud_fan] was this 
cherry-picked to branch-3.0 without building it?

> Consistancy between dayofweek/dow in extract expression and dayofweek function
> ------------------------------------------------------------------------------
>
>                 Key: SPARK-31474
>                 URL: https://issues.apache.org/jira/browse/SPARK-31474
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Kent Yao
>            Assignee: Kent Yao
>            Priority: Major
>             Fix For: 3.0.0
>
>
> {code:sql}
> spark-sql> SELECT extract(dayofweek from '2009-07-26');
> 1
> spark-sql> SELECT extract(dow from '2009-07-26');
> 0
> spark-sql> SELECT extract(isodow from '2009-07-26');
> 7
> spark-sql> SELECT dayofweek('2009-07-26');
> 1
> spark-sql> SELECT weekday('2009-07-26');
> 6
> {code}
> Currently, there are 4 types of day-of-week range: 
> the function dayofweek(2.3.0) and extracting dayofweek(2.4.0) result as of 
> Sunday(1) to Saturday(7)
> extracting dow(3.0.0) results as of Sunday(0) to Saturday(6)
> extracting isodow (3.0.0)  results as of Monday(1) to Sunday(7)
> the function weekday(2.4.0) results as of Monday(0) to Sunday(6)
> Actually, extracting dayofweek and dow are both derived from PostgreSQL but 
> have different meanings.
> https://issues.apache.org/jira/browse/SPARK-23903
> https://issues.apache.org/jira/browse/SPARK-28623



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to