Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
aa7195c
in work
waralexrom Jul 7, 2025
f243fd4
in work
waralexrom Jul 8, 2025
0f97a6e
in work
waralexrom Jul 13, 2025
cc041f7
in work
waralexrom Jul 14, 2025
0d29962
sql-generation parity
waralexrom Jul 22, 2025
4e020b7
in work
waralexrom Jul 22, 2025
9f7bf6d
fix
waralexrom Jul 22, 2025
c50926d
in work
waralexrom Jul 22, 2025
46f6cdf
remove base members first step
waralexrom Jul 22, 2025
51baa7a
in work
waralexrom Jul 22, 2025
b079800
in work
waralexrom Jul 22, 2025
f041ea5
BaseMembers removed
waralexrom Jul 22, 2025
ef84556
remove unsused files
waralexrom Jul 22, 2025
9383446
fix
waralexrom Jul 22, 2025
95eafb3
remove dublicated functions
waralexrom Jul 22, 2025
b0228e0
in work
waralexrom Jul 23, 2025
17910e3
in work
waralexrom Jul 23, 2025
9193b3d
in work
waralexrom Jul 23, 2025
32c8545
in work
waralexrom Jul 23, 2025
158683e
in work
waralexrom Jul 23, 2025
eb2d35f
in work
waralexrom Jul 23, 2025
dc4c3c5
in work
waralexrom Jul 23, 2025
39cc31a
in work
waralexrom Jul 23, 2025
9fd1dd4
in work
waralexrom Jul 23, 2025
470efa6
in work
waralexrom Jul 23, 2025
1cb001c
in work
waralexrom Jul 23, 2025
60f3519
in work
waralexrom Jul 24, 2025
9609bc2
in work
waralexrom Jul 24, 2025
654a5eb
in work
waralexrom Jul 24, 2025
ed17f7d
in work
waralexrom Jul 25, 2025
e2663b8
in work
waralexrom Aug 6, 2025
a87b3f9
in work
waralexrom Aug 6, 2025
d336b61
in work
waralexrom Aug 6, 2025
c88e90d
in work
waralexrom Aug 6, 2025
397684f
in work
waralexrom Aug 10, 2025
66d8a2f
upd
waralexrom Aug 25, 2025
d2b5911
fix tests
waralexrom Aug 26, 2025
a5a7d56
fix tests
waralexrom Aug 26, 2025
22b8d9b
upd
waralexrom Aug 27, 2025
0de904a
upd
waralexrom Aug 27, 2025
a66770d
lint
waralexrom Aug 27, 2025
2ac830c
drivers tests
waralexrom Aug 27, 2025
8d6ccd7
fix
waralexrom Aug 27, 2025
0b499ca
fix
waralexrom Aug 28, 2025
3918dc0
fix
waralexrom Aug 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cubejs-schema-compiler/src/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -4116,7 +4116,7 @@ export class BaseQuery {
VAR_SAMP: 'VAR_SAMP({{ args_concat }})',
COVAR_POP: 'COVAR_POP({{ args_concat }})',
COVAR_SAMP: 'COVAR_SAMP({{ args_concat }})',

GROUP_ANY: 'max({{ expr }})',
COALESCE: 'COALESCE({{ args_concat }})',
CONCAT: 'CONCAT({{ args_concat }})',
FLOOR: 'FLOOR({{ args_concat }})',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class PrestodbQuery extends BaseQuery {
templates.statements.select = '{% if ctes %} WITH \n' +
'{{ ctes | join(\',\n\') }}\n' +
'{% endif %}' +
'SELECT {{ select_concat | map(attribute=\'aliased\') | join(\', \') }} {% if from %}\n' +
'SELECT {% if distinct %}DISTINCT {% endif %}{{ select_concat | map(attribute=\'aliased\') | join(\', \') }} {% if from %}\n' +
'FROM (\n {{ from }}\n) AS {{ from_alias }} {% elif from_prepared %}\n' +
'FROM {{ from_prepared }}' +
'{% endif %}' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,11 @@ cubes:
calendar_orders__count_shifted_calendar_m: '3',
custom_calendar__retail_date_month: '2025-12-01T00:00:00.000Z',
},
{
calendar_orders__count: null,
calendar_orders__count_shifted_calendar_m: '3',
custom_calendar__retail_date_month: '2026-01-01T00:00:00.000Z',
},
]));

it('Count shifted by retail week (common shift + custom granularity)', async () => runQueryTest({
Expand All @@ -708,6 +713,11 @@ cubes:
}],
order: [{ id: 'custom_calendar.retail_date' }]
}, [
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: null,
custom_calendar__retail_date_week: '2025-02-02T00:00:00.000Z',
},
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: '1',
Expand All @@ -723,11 +733,31 @@ cubes:
calendar_orders__count_shifted_calendar_w: '1',
custom_calendar__retail_date_week: '2025-02-23T00:00:00.000Z',
},
{
calendar_orders__count: null,
calendar_orders__count_shifted_calendar_w: '1',
custom_calendar__retail_date_week: '2025-03-02T00:00:00.000Z',
},
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: null,
custom_calendar__retail_date_week: '2025-03-09T00:00:00.000Z',
},
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: '1',
custom_calendar__retail_date_week: '2025-03-16T00:00:00.000Z',
},
{
calendar_orders__count: null,
calendar_orders__count_shifted_calendar_w: '1',
custom_calendar__retail_date_week: '2025-03-23T00:00:00.000Z',
},
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: null,
custom_calendar__retail_date_week: '2025-03-30T00:00:00.000Z',
},
{
calendar_orders__count: '1',
calendar_orders__count_shifted_calendar_w: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,39 @@ views:
}
],
timezone: 'UTC'
}, [{
orders__date_year: '2023-01-01T00:00:00.000Z',
orders__revenue: '15',
orders__revenue_1_y_ago: '5',
orders__cagr_1_y: '2.0000000000000000'
},
{
orders__date_year: '2024-01-01T00:00:00.000Z',
orders__revenue: '30',
orders__revenue_1_y_ago: '15',
orders__cagr_1_y: '1.0000000000000000'
},
{
orders__date_year: '2025-01-01T00:00:00.000Z',
orders__revenue: '5',
orders__revenue_1_y_ago: '30',
orders__cagr_1_y: '-0.83333333333333333333'
}],
}, [
{
orders__cagr_1_y: null,
orders__date_year: '2022-01-01T00:00:00.000Z',
orders__revenue: '5',
orders__revenue_1_y_ago: null,
},
{
orders__date_year: '2023-01-01T00:00:00.000Z',
orders__revenue: '15',
orders__revenue_1_y_ago: '5',
orders__cagr_1_y: '2.0000000000000000'
},
{
orders__date_year: '2024-01-01T00:00:00.000Z',
orders__revenue: '30',
orders__revenue_1_y_ago: '15',
orders__cagr_1_y: '1.0000000000000000'
},
{
orders__date_year: '2025-01-01T00:00:00.000Z',
orders__revenue: '5',
orders__revenue_1_y_ago: '30',
orders__cagr_1_y: '-0.83333333333333333333'
},

{
orders__cagr_1_y: null,
orders__date_year: '2026-01-01T00:00:00.000Z',
orders__revenue: null,
orders__revenue_1_y_ago: '5',
},
],
{ joinGraph, cubeEvaluator, compiler }));
} else {
// This test is working only in tesseract
Expand Down
Loading
Loading