fix(cubesql): Support to_timestamp(epoch) pg function, fix #8901
Check List
- [x] Tests has been run in packages where changes made if available
- [x] Linter has been run for changed code
- [x] Tests for the changes have been added if not covered yet
- [ ] Docs have been added / updated if required
Issue Reference this PR resolves #8901
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| examples-angular-dashboard | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-d3 | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-dashboard | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-data-table | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-highcharts | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-material-ui | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-react-pivot-table | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm | |
| examples-vue-query-builder | ⬜️ Ignored (Inspect) | Visit Preview | Nov 14, 2024 4:42pm |
@droidraja Thanks for contributing! Could you please provide at least one test for it? Thanks!
@droidraja Thanks for contributing! Could you please provide at least one test for it? Thanks!
@paveltiunov, ~~This does not work for complex queries like to_timetamp(cast(epoch_varchar as numeric(10))) which is being issued by quicksight, will add a UDF to handle the same and push the changes with tests in some time~~
@paveltiunov have added the udf and testcases, please go ahead with the review.
@droidraja Could you also please update the docs here? https://cube.dev/docs/reference/sql-api#data-type-formatting-functions
@igorlukanin This PR and the existing functionality supports evaluation of constant expression to cube time dimension filter and to_timestamp can't be applied to any columns. So it doesn't support both projection and post processing that is mentioned in the docs.
@paveltiunov please correct my understanding if there are any holes.
@MazterQyou WDYT?