opensearch-project / opensearch-project/sql
[FEATURE] Support time zone Information in timestamp literals
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
Is your feature request related to a problem?
Currently, the query engine does not support time zone information in timestamp literals. When using an ISO 8601 format with a time zone (e.g., 2025-05-15T10:30:00.000Z), the query fails with a SemanticCheckException.
POST {{baseUrl}}/_plugins/_ppl
Content-Type: application/x-ndjson
{
"query": "source=test00001 | eval t=TIMESTAMP('2025-05-15T10:30:00.000Z')"
}
### Results
{
"error": {
"reason": "Invalid Query",
"details": "timestamp:2025-05-15T10:30:00.000Z in unsupported format, please use 'yyyy-MM-dd HH:mm:ss[.SSSSSSSSS]'",
"type": "SemanticCheckException"
},
"status": 400
}
What solution would you like?
The engine should support ISO 8601 timestamp literals with time zone information (e.g., Z, +08:00, etc.) and interpret them correctly.
What alternatives have you considered?
n/a
Do you have any additional context?
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided PPL request and tracing how TIMESTAMP literals are parsed and validated in the query engine. Check the existing timestamp format handling, then add coverage for Z and offset forms such as +08:00; done means valid ISO 8601 values are accepted and interpreted correctly without breaking existing formats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100