maropu commented on a change in pull request #28276:
URL: https://github.com/apache/spark/pull/28276#discussion_r411881765



##########
File path: sql/core/src/test/resources/sql-tests/inputs/extract.sql
##########
@@ -83,3 +83,21 @@ select extract(epoch from c) from t;
 
 select extract(not_supported from c) from t;
 select extract(not_supported from i) from t;
+
+-- In SPARK-31476, we've supported extract('field', source), too
+select date_part('millennium', c) from t;

Review comment:
       Actually, this support (`extract('field', source)`) is a side-effect of 
#31476.... `EXTRACT` should be formed as `EXTRACT(field FROM source)`, so [the 
`example` 
field](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala#L2235-L2248)
 in `ExpressionDescription` is different now from each other. Related 
discussion: https://github.com/apache/spark/pull/21479#discussion_r409933251 




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to