TO_TIMESTAMP failing when only date is provided
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Failed SQL**
Query:
```
SELECT
SUM("total_active_pipeline")
FROM
"pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(TO_TIMESTAMP('2025-10-09', 'YYYY-MM-DD') AS TIMESTAMP)
```
Returned error:
`Error during rewrite: Can't detect Cube query and it may be not supported yet. Please check logs for additional information.`
**Logical Plan**
Cube compiled query:
```
SELECT
SUM("total_active_pipeline") FROM "pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(str_to_date('2025-10-09', 'YYYY-MM-DD') AS TIMESTAMP)
```
Cube error:
```
TRACE [cubesql::compile::rewrite::analysis]
Can't evaluate expression: Execution("Error evaluating str_to_date('2025-10-09', '%Y-%m-%d'): input is not enough for unique date and time")
```
**Tool**
GoodData Cloud
**Additional context**
If time is included the request works:
```
SELECT
SUM("total_active_pipeline")
FROM
"pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(TO_TIMESTAMP('2025-10-09 10:30', 'YYYY-MM-DD HH24:MI') AS TIMESTAMP)
```
Contributor guide
Assessment
This issue has not been assessed yet.