Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SourceScanOptimizer generating duplicated columns #1494

Merged
merged 9 commits into from
Nov 5, 2024
15 changes: 15 additions & 0 deletions tests_metricflow/integration/test_cases/itest_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,21 @@ integration_test:
ds
) a
---
integration_test:
serramatutu marked this conversation as resolved.
Show resolved Hide resolved
name: shared_alias_derived_metric
description: Tests derived metrics which use the same alias for different things
model: SIMPLE_MODEL
metrics: ["derived_sharedalias_1a", "derived_sharedalias_2"]
group_bys: ["booking__is_instant"]
check_query: |
SELECT
is_instant AS booking__is_instant
, COUNT(*) - 10 AS derived_sharedalias_1a
, SUM(CASE WHEN is_instant THEN 1 ELSE 0 END) + 10 AS derived_sharedalias_2
FROM {{ source_schema }}.fct_bookings
GROUP BY
booking__is_instant
---
integration_test:
name: two_metrics_with_null_dimension_values
description: Tests querying two metrics with a dimension having a NULL values
Expand Down