You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/01 06:41:01 UTC

[GitHub] [arrow-datafusion] naosense commented on pull request #4054: Implement `current_time` scalar function

naosense commented on PR #4054:
URL: https://github.com/apache/arrow-datafusion/pull/4054#issuecomment-1298092286

   I followed @comphead 's `current_date` test case
   ```
   let sql = "select case when current_time() = cast(now() as time) then 'OK' else 'FAIL' end result";
       let results = execute_to_batches(&ctx, sql).await;
   
       let expected = vec![
           "+--------+",
           "| result |",
           "+--------+",
           "| OK     |",
           "+--------+",
       ];
   
       assert_batches_eq!(expected, &results);
   ```
   but it reported an error
   ```
   thread 'sql::timestamp::test_current_time' panicked at 'called `Result::unwrap()` on an `Err` value: "NotImplemented(\"Unsupported CAST from Timestamp(Nanosecond, Some(\\\"UTC\\\")) to Time64(Nanosecond)\") at Creating physical plan for 'select case when current_time() = cast(now() as time) then 'OK' else 'FAIL' end result': Projection: CASE WHEN currenttime() = CAST(now() AS Time64(Nanosecond)) THEN Utf8(\"OK\") ELSE Utf8(\"FAIL\") END AS result\n  EmptyRelation"', datafusion/core/tests/sql/mod.rs:806:10
   ```
   Is anything i missed?


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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