cube-js / cube

📊 Cube — Universal semantic layer platform for AI, BI, spreadsheets, and embedded analytics
https://cube.dev
Other
17.96k stars 1.78k forks source link

feat(cubesql) Implement format / col_description #8947

Open pauldheinrichs opened 1 week ago

pauldheinrichs commented 1 week ago

Semi-resolves: https://github.com/cube-js/cube/issues/8926

Hoping to unblock metabase failing field sync on it's latest version. This pull requests implements

It also noops


I don't have a tonne of bandwidth to fully implement the missing macro but this at least helps unblock the current request metabase is making to cube and failing when attempting to sync-fields.

It's not entirely clear if there's already an inherent way to lookup the table OID to get that result from the RegClass result to be leveraged in col_description implementation

Issue Reference this PR resolves

[For example #12]

Description of Changes Made (if issue reference is not provided)

[Description goes here]

vercel[bot] commented 1 week ago

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](https://vercel.com/cube-dev/examples-angular-dashboard/9nvfdscCJJbJMnkHztGanev5f1A9)) | [Visit Preview](https://examples-angular-dashboard-git-fork-pauldheinri-f7f429-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-d3** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-d3/C5gVhumWdj8zDMMC78akM2r8pFFC)) | [Visit Preview](https://examples-react-d3-git-fork-pauldheinrichs-ph-su-b3aaac-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-dashboard** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-dashboard/6oCV6DtQQM74Bhv2eRhbhp2Q2uMp)) | [Visit Preview](https://examples-react-dashboard-git-fork-pauldheinrich-d56063-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-data-table** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-data-table/9NoLR6E88jj69dGATijvfEfy85LY)) | [Visit Preview](https://examples-react-data-table-git-fork-pauldheinric-014c88-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-highcharts** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-highcharts/CXvs8gtJwF6mciTMsbgPwWwGkDpW)) | [Visit Preview](https://examples-react-highcharts-git-fork-pauldheinric-1fd117-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-material-ui** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-material-ui/Gj4gzC8HhRkK8Kz4fbfXbBiAVDW1)) | [Visit Preview](https://examples-react-material-ui-git-fork-pauldheinri-da8e10-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-react-pivot-table** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-react-pivot-table/g7APSZXqGizH2YH2C7LV16sV7SdK)) | [Visit Preview](https://examples-react-pivot-table-git-fork-pauldheinri-90a325-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm | | **examples-vue-query-builder** | ⬜️ Ignored ([Inspect](https://vercel.com/cube-dev/examples-vue-query-builder/FMycKy1G1uTDxwN7s6GxSyUz6yiE)) | [Visit Preview](https://examples-vue-query-builder-git-fork-pauldheinri-350ff1-cube-dev.vercel.app) | | Nov 18, 2024 4:12pm |
pauldheinrichs commented 1 week ago
2024-11-13 13:29:54,605 ERROR [Cube SQL Error] {"error": "Error during processing PostgreSQL message: CubeError: error in reqwest: builder error", "appName": "NULL", "protocol": "postgres", "apiType": "sql"}
thread 'main' panicked at cubesql/e2e/tests/postgres.rs:316:25:
unexpected return, simple query must be cancelled, actual: Ok(())

doesn't appear related to my changes, all specs i've added have passed 🤔

droidraja commented 6 days ago
2024-11-13 13:29:54,605 ERROR [Cube SQL Error] {"error": "Error during processing PostgreSQL message: CubeError: error in reqwest: builder error", "appName": "NULL", "protocol": "postgres", "apiType": "sql"}
thread 'main' panicked at cubesql/e2e/tests/postgres.rs:316:25:
unexpected return, simple query must be cancelled, actual: Ok(())

doesn't appear related to my changes, all specs i've added have passed 🤔

@pauldheinrichs My PR is also failing with the same set of tests. I was trying to find a PR for which this GHA was succeeding. https://github.com/cube-js/cube/pull/8902 Will be watching this thread for any updates.

ovr commented 3 days ago

I am not sure, but I prepared a potential fix for the CI issue: https://github.com/cube-js/cube/commit/b75a37a8ea3f258817480c1ea00b3e93b2434512

@pauldheinrichs Could you please rebase your PR? Thanks!

pauldheinrichs commented 3 days ago

I am not sure, but I prepared a potential fix for the CI issue: b75a37a

@pauldheinrichs Could you please rebase your PR? Thanks!

@ovr All set! Rebased!

codecov[bot] commented 3 days ago

Codecov Report

Attention: Patch coverage is 86.95652% with 33 lines in your changes missing coverage. Please review.

Project coverage is 79.76%. Comparing base (b75a37a) to head (99db541). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...t/cubesql/cubesql/src/compile/engine/udf/common.rs 73.80% 33 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8947 +/- ## ========================================== - Coverage 82.66% 79.76% -2.90% ========================================== Files 221 221 Lines 78303 78545 +242 ========================================== - Hits 64727 62654 -2073 - Misses 13576 15891 +2315 ``` | [Flag](https://app.codecov.io/gh/cube-js/cube/pull/8947/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cube-js) | Coverage Δ | | |---|---|---| | [cubesql](https://app.codecov.io/gh/cube-js/cube/pull/8947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cube-js) | `79.76% <86.95%> (-2.90%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cube-js#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

pauldheinrichs commented 1 day ago

@ovr Is there anything further you'd like to see in this PR? I'd love to merge this so we can update our metabase instance