You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/09/29 08:45:50 UTC
[GitHub] [arrow] mapleFU commented on a diff in pull request #37949: GH-37799: [C++] Compute: CommonTemporal support time32 and time64 casting
mapleFU commented on code in PR #37949:
URL: https://github.com/apache/arrow/pull/37949#discussion_r1341084958
##########
cpp/src/arrow/compute/kernels/codegen_internal.cc:
##########
@@ -282,15 +296,31 @@ TypeHolder CommonTemporal(const TypeHolder* begin, size_t count) {
}
}
- if (timezone) {
- // At least one timestamp seen
- return timestamp(finest_unit, *timezone);
- } else if (saw_date64) {
- return date64();
- } else if (saw_date32) {
- return date32();
- } else if (saw_duration) {
- return duration(finest_unit);
+ bool has_saw_time_since_midnight = saw_time32 || saw_time64;
+ bool has_saw_time_or_date = timezone || saw_date64 || saw_date32 || saw_duration;
+
+ if (has_saw_time_since_midnight && has_saw_time_or_date) {
Review Comment:
I think time32/time64 means time in a day, so they can't cast to timestamp and related type
--
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