| 31 | namespace gandiva { |
| 32 | |
| 33 | static inline gdv_timestamp StringToTimestamp(const std::string& s) { |
| 34 | int64_t out = 0; |
| 35 | bool success = ::arrow::internal::ParseTimestampStrptime( |
| 36 | s.c_str(), s.length(), "%Y-%m-%d %H:%M:%S", /*ignore_time_in_day=*/false, |
| 37 | /*allow_trailing_chars=*/false, ::arrow::TimeUnit::SECOND, &out); |
| 38 | ARROW_DCHECK(success); |
| 39 | ARROW_UNUSED(success); |
| 40 | return out * 1000; |
| 41 | } |
| 42 | |
| 43 | } // namespace gandiva |
no test coverage detected