You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2025/07/17 22:31:18 UTC
(superset) 06/07: Checkpoint
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch dbt-metricflow
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 3430d69972173cfc74f86569851b4b50879b6b35
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Thu Jul 17 18:25:17 2025 -0400
Checkpoint
---
.../components/controls/SemanticLayerVerification.tsx | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/explore/components/controls/SemanticLayerVerification.tsx b/superset-frontend/src/explore/components/controls/SemanticLayerVerification.tsx
index c9b0eba3f3..303d22af3f 100644
--- a/superset-frontend/src/explore/components/controls/SemanticLayerVerification.tsx
+++ b/superset-frontend/src/explore/components/controls/SemanticLayerVerification.tsx
@@ -28,6 +28,7 @@ export function collectQueryFields(formData: any): {
dimensions: string[];
metrics: string[];
} {
+ console.log('collectQueryFields input:', formData);
const dimensions: string[] = [];
const metrics: string[] = [];
@@ -81,10 +82,13 @@ export function collectQueryFields(formData: any): {
: (metric as any)?.metric_name || String(metric),
);
- return {
+ const result = {
dimensions: [...new Set(cleanDimensions)], // Remove duplicates
metrics: [...new Set(cleanMetrics)], // Remove duplicates
};
+
+ console.log('collectQueryFields output:', result);
+ return result;
}
/**
@@ -170,7 +174,8 @@ export function createMetricsVerification(controlName?: string): AsyncVerify {
const updatedFormData = { ...form_data };
// Update the appropriate field based on the control name
- if (value !== undefined && controlName) {
+ // Handle both addition and removal of values (including empty arrays)
+ if (controlName) {
updatedFormData[controlName] = value;
}
@@ -183,6 +188,9 @@ export function createMetricsVerification(controlName?: string): AsyncVerify {
originalFormData: form_data,
updatedFormData,
value,
+ valueType: typeof value,
+ isArray: Array.isArray(value),
+ valueLength: Array.isArray(value) ? value.length : 'N/A',
dimensions: queryFields.dimensions,
metrics: queryFields.metrics,
});
@@ -279,7 +287,8 @@ export function createColumnsVerification(controlName?: string): AsyncVerify {
const updatedFormData = { ...form_data };
// Update the appropriate field based on the control name
- if (value !== undefined && controlName) {
+ // Handle both addition and removal of values (including empty arrays)
+ if (controlName) {
updatedFormData[controlName] = value;
}
@@ -292,6 +301,9 @@ export function createColumnsVerification(controlName?: string): AsyncVerify {
originalFormData: form_data,
updatedFormData,
value,
+ valueType: typeof value,
+ isArray: Array.isArray(value),
+ valueLength: Array.isArray(value) ? value.length : 'N/A',
dimensions: queryFields.dimensions,
metrics: queryFields.metrics,
});