NVIDIA / NVIDIA/cudf

[FEA] Support negative years when converting date string to a timestamp

Open
#13,682 0 comments 0 reactions 0 assignees View on GitHub
0 - Backlog bug libcudf Spark
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
I wish cudf could support negative years when trying to convert string date to a timestamp

**Describe the solution you'd like**
The test below should pass
```
@Test
public void testNegativeTimeString() {
final String[] TIMES_S_STRING = {"-1970-02-01 00:00:00"};
try (ColumnVector s_string_times = ColumnVector.fromStrings(TIMES_S_STRING);
ColumnVector s_result = s_string_times.asTimestampSeconds("%Y-%m-%d %H:%M:%S");
ColumnVector s_expected = applyAndClose(ColumnVector.fromLongs(-124331673600l), cv -> cv.asTimestampSeconds())) {
assertColumnsAreEqual(s_expected, s_result);
}
}

```

**Describe alternatives you've considered**
NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.