From b1ec4d6e7c892f39aa9faee43a3085d2f65b78fa Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Mon, 29 Jul 2024 16:13:13 -0700 Subject: [PATCH] Remove tests that require engine-specific syntax in metric definitions These are breaking for Trino, so I'm removing them for now. I have a task up to put up equivalent tests in SQL rendering section instead, where I can specify to skip for Trino. --- .../simple_manifest/metrics.yaml | 19 ------------------- .../integration/test_cases/itest_metrics.yaml | 12 ------------ 2 files changed, 31 deletions(-) diff --git a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml index aa3545865d..6d9116f015 100644 --- a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml +++ b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml @@ -783,22 +783,3 @@ metric: name: listings filter: "{{ Metric('views', ['listing']) }} > 10" time_granularity: week ---- -metric: - name: bookings_before_dec_20_2019 - description: Bookings up to the end of 2022 - type: simple - type_params: - measure: bookings - filter: "{{ TimeDimension('metric_time') }} < '2012-12-20'" ---- -metric: - name: bookings_between_dec_18_2019_and_dec_20_2019 - description: Bookings starting in 2020. Used to test a metric with different types of ambiguous filters in on its input metric. - type: derived - type_params: - expr: bookings_before_dec_20_2019 - metrics: - - name: bookings_before_dec_20_2019 - filter: "{{ TimeDimension('metric_time') }} > '2019-12-18'" - time_granularity: week diff --git a/tests_metricflow/integration/test_cases/itest_metrics.yaml b/tests_metricflow/integration/test_cases/itest_metrics.yaml index 7c6e96f8f6..52b805f9ea 100644 --- a/tests_metricflow/integration/test_cases/itest_metrics.yaml +++ b/tests_metricflow/integration/test_cases/itest_metrics.yaml @@ -2215,15 +2215,3 @@ integration_test: GROUP BY {{ render_date_trunc("ds", TimeGranularity.DAY) }} ) a ON b.ds = a.ds WHERE {{ render_between_time_constraint("b.ds", "2020-01-03", "2020-01-03") }} ---- -integration_test: - name: metric_time_filter_on_input_metric - description: Test a metric with a filter defined on its input metric. - model: SIMPLE_MODEL - metrics: ["bookings_between_dec_18_2019_and_dec_20_2019"] - check_query: | - SELECT - SUM(1) AS bookings_between_dec_18_2019_and_dec_20_2019 - FROM {{ source_schema }}.fct_bookings - WHERE ({{ render_date_trunc("ds", TimeGranularity.DAY) }} < '2012-12-20') - AND ({{ render_date_trunc("ds", TimeGranularity.WEEK) }} > '2019-12-18')