Dandandan commented on a change in pull request #9359:
URL: https://github.com/apache/arrow/pull/9359#discussion_r567235809



##########
File path: rust/datafusion/src/logical_plan/expr.rs
##########
@@ -237,6 +245,25 @@ impl Expr {
             Expr::Wildcard => Err(DataFusionError::Internal(
                 "Wildcard expressions are not valid in a logical query 
plan".to_owned(),
             )),
+            Expr::Extract {
+                date_part: DatePart::Hour,
+                expr,
+            } => {
+                let inner = expr.get_type(schema)?;
+                match inner {
+                    DataType::Date32(_)
+                    | DataType::Date64(_)
+                    | DataType::Time32(_)
+                    | DataType::Time64(_)
+                    | 
DataType::Timestamp(arrow::datatypes::TimeUnit::Nanosecond, None) => {

Review comment:
       I wasn't convinced yet the `hour` kernel was working correctly, and it's 
currently a bit hard to test from DataFusion. But I am convinced now that it 
should work as expected. I think it can use some more tests at the Arrow side 
as well.




----------------------------------------------------------------
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:
[email protected]


Reply via email to