Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ describe('SQL Generation', () => {
type: 'sum',
sql: 'amount',
},
revenue_1d_d1_dd: {
type: 'sum',
sql: 'amount',
},
visitor_revenue: {
type: 'sum',
sql: 'amount',
Expand Down Expand Up @@ -3265,6 +3269,15 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
}]
));

it('aliases for columns with digits and underscores', async () => runQueryTest(
{
measures: ['visitors.revenue_1d_d1_dd'],
},
[{
visitors__revenue_1d_d1_dd: '2000',
}]
));

// Subquery aggregation for multiplied measure (and any `keysSelect` for that matter)
// should pick up all dimensions, even through member expressions
it('multiplied sum with dimension member expressions', async () => runQueryTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl PlanSqlTemplates {
.with_boundaries(&[
UNDERSCORE_UPPER_BOUND,
Boundary::LOWER_UPPER,
Boundary::DIGIT_LOWER,
Boundary::DIGIT_UPPER,
Boundary::ACRONYM,
])
.to_case(Case::Snake)
Expand Down
Loading