-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
cube storeIssues relating to Cube StoreIssues relating to Cube Store
Description
Describe the bug
Similar to #5536, building pre-aggregations using trino as a data source fails whenever a field of type: time
are present, with the following error message:
Error during create table: CREATE TABLE <REDACTED>: Internal: ParserError("Expected ',' or ')' after column definition, found: (")
To Reproduce
Steps to reproduce the behavior:
- Create the attached data model.
- Launch cube.
- Wait for cube to start building pre-aggregations.
- See error.
Expected behavior
Cubestore successfully builds the pre-aggregation.
Minimally reproducible Cube Schema
cubes:
- name: orders
sql: |
SELECT 1 as user_id, 2025-01-01T00:00:00.000+00 as created_at
UNION ALL
SELECT 1 as user_id, 2025-01-02T00:00:00.000+00 as created_at
UNION ALL
SELECT 2 as user_id, 2025-01-01T00:00:00.000+00 as created_at
pre_aggregations:
- name: first_order_by_user_id
measures:
- CUBE.first_order
dimensions:
- CUBE.user_id
time_dimension: CUBE.created_at
granularity: day
measures:
- name: first_order
type: min
sql: created_at
dimensions:
- name: user_id
sql: user_id
type: number
- name: created_at
sql: created_at
type: time
Version:
v1.3.46
Additional Context
In this case, cubestore receives timestamp(6)
instead of timestamp
when querying for information schemas. The fix should be very similar to #6324, i.e. adding the following to the GenericTypeToCubeStore
map:
timestamp(6): timestamp
As a workaround, it is possible to cast(created_at as timestamp(3))
in the data model.
Metadata
Metadata
Assignees
Labels
cube storeIssues relating to Cube StoreIssues relating to Cube Store