We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reason: manual parsing of timestamp values https://github.com/opensearch-project/sql/blob/c923e80cd654ee8136c74180bf0bd6231044ff71/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimestampType.java#L63-L96
select timestamp("1970-01-01 12:00:00.501");
fetched rows / total rows = 73/73 +-------------------------+--------------------------------+ | val | key | |-------------------------+--------------------------------| | null | null | | 1899-01-01 20:00:00 | 001: 1899-01-01 12:00:00 | | 1899-12-31 20:00:00 | 002: 1899-12-31 12:00:00 | | 1940-02-29 20:00:00 | 003: 1940-02-29 12:00:00 | | 1970-01-01 08:00:00 | 004: 1970-01-01 00:00:00-epoch | | 1970-01-01 08:00:01 | 005: 1970-01-01 00:00:01 | | 1970-01-01 09:00:00 | 006: 1970-01-01 01:00:00 | | 1970-01-01 09:59:00 | 007: 1970-01-01 01:59:00 | | 1970-01-01 09:59:59 | 008: 1970-01-01 01:59:59 | | 1970-01-01 10:00:00 | 009: 1970-01-01 02:00:00 | | 1970-01-01 10:00:01 | 010: 1970-01-01 02:00:01 | | 1970-01-01 10:30:00.1 | 011: 1970-01-01 02:30:00.1 | | 1970-01-01 11:00:00.2 | 012: 1970-01-01 03:00:00.2 | | 1970-01-01 12:00:00.3 | 013: 1970-01-01 04:00:00.3 | | 1970-01-01 13:00:00.4 | 014: 1970-01-01 05:00:00.4 | | 1970-01-01 14:00:00.5 | 015: 1970-01-01 06:00:00.5 | | 1970-01-01 15:00:00.6 | 016: 1970-01-01 07:00:00.6 | | 1970-01-01 16:00:00.7 | 017: 1970-01-01 08:00:00.7 | | 1970-01-01 17:00:00.8 | 018: 1970-01-01 09:00:00.8 | | 1970-01-01 18:00:00.9 | 019: 1970-01-01 10:00:00.9 | | 1970-01-01 19:59:00.499 | 020: 1970-01-01 11:59:00.499 | | 1970-01-01 19:59:59.5 | 021: 1970-01-01 11:59:59.500 | | 1970-01-01 20:00:00.501 | 022: 1970-01-01 12:00:00.501 |
Use API for parsing, e.g. Timestamp.valueOf method:
Timestamp.valueOf
java.sql.Timestamp.valueOf("1970-01-01 12:00:00.501") = 1970-01-01 12:00:00.501
2.x @ e2bf2544
2.x
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is the bug?
Reason: manual parsing of timestamp values
https://github.com/opensearch-project/sql/blob/c923e80cd654ee8136c74180bf0bd6231044ff71/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimestampType.java#L63-L96
How can one reproduce the bug?
JDBC output:
SQL plugin output:
What is the expected behavior?
Use API for parsing, e.g.
Timestamp.valueOf
method:What is your host/environment?
2.x
@ e2bf2544The text was updated successfully, but these errors were encountered: