jvictorhuguenin commented on a change in pull request #10402:
URL: https://github.com/apache/arrow/pull/10402#discussion_r657079865
##########
File path: cpp/src/gandiva/precompiled/time.cc
##########
@@ -775,6 +851,17 @@ gdv_time32 castTIME_timestamp(gdv_timestamp
timestamp_in_millis) {
return static_cast<int32_t>(millis_since_midnight);
}
+// Gets an arbitrary number and return the number of milliseconds since
midnight
+int32_t castTIME_int32(int32_t int_val) {
Review comment:
```suggestion
gdv_time32 castTIME_int32(int32_t int_val) {
```
##########
File path: cpp/src/gandiva/precompiled/types.h
##########
@@ -262,7 +262,9 @@ gdv_timestamp castTIMESTAMP_utf8(int64_t execution_context,
const char* input,
gdv_timestamp castTIMESTAMP_date64(gdv_date64);
gdv_timestamp castTIMESTAMP_int64(gdv_int64);
gdv_date64 castDATE_timestamp(gdv_timestamp);
+int32_t castTIME_utf8(int64_t context, const char* input, int32_t length);
Review comment:
```suggestion
gdv_time32 castTIME_utf8(int64_t context, const char* input, int32_t length);
```
##########
File path: cpp/src/gandiva/precompiled/types.h
##########
@@ -262,7 +262,9 @@ gdv_timestamp castTIMESTAMP_utf8(int64_t execution_context,
const char* input,
gdv_timestamp castTIMESTAMP_date64(gdv_date64);
gdv_timestamp castTIMESTAMP_int64(gdv_int64);
gdv_date64 castDATE_timestamp(gdv_timestamp);
+int32_t castTIME_utf8(int64_t context, const char* input, int32_t length);
gdv_time32 castTIME_timestamp(gdv_timestamp timestamp_in_millis);
+int32_t castTIME_int32(int32_t int_val);
Review comment:
```suggestion
gdv_time32 castTIME_int32(int32_t int_val);
```
##########
File path: cpp/src/gandiva/precompiled/time.cc
##########
@@ -764,6 +764,82 @@ gdv_date64 castDATE_timestamp(gdv_timestamp
timestamp_in_millis) {
return tp.ClearTimeOfDay().MillisSinceEpoch();
}
+/*
+ * Input consists of mandatory and optional fields.
+ * Mandatory fields are hours, minutes.
+ * The seconds and subseconds are optional.
+ * Format is hours:minutes[:seconds.millis]
+ */
+int32_t castTIME_utf8(int64_t context, const char* input, int32_t length) {
Review comment:
```suggestion
gdv_time32 castTIME_utf8(int64_t context, const char* input, int32_t length)
{
```
--
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]