Skip to content

Commit 921b956

Browse files
committed
Some small updates
chore: Ran go fmt one more time for good measure chore(test): Adjusted test on abs_path to work cross-platform
1 parent 62449bd commit 921b956

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

wren-launcher/commands/dbt/converter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ func buildAggregationExpression(metricType string, typeParams map[string]interfa
837837
if measure, ok := typeParams["measure"].(map[string]interface{}); ok {
838838
measureName := getStringFromMap(measure, "name", "")
839839
if measureData, ok := measureDataLookup[measureName]; ok {
840-
agg := getStringFromMap(measureData, "agg", "sum") // Default to SUM
840+
agg := getStringFromMap(measureData, "agg", "sum") // Default to SUM
841841
expr := getStringFromMap(measureData, "expr", measureName) // Fallback to measure name
842842
return fmt.Sprintf("%s(%s)", strings.ToUpper(agg), expr)
843843
}
@@ -1084,4 +1084,4 @@ func parseRef(refStr string) string {
10841084
return matches[1]
10851085
}
10861086
return ""
1087-
}
1087+
}

wren-launcher/commands/dbt/data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,4 +484,4 @@ func (d *DefaultDataSource) MapType(sourceType string) string {
484484
default:
485485
return strings.ToLower(sourceType)
486486
}
487-
}
487+
}

wren-launcher/commands/dbt/data_source_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func TestFromDbtProfiles_LocalFile(t *testing.T) {
152152
t.Fatalf("Expected WrenLocalFileDataSource, got %T", dataSources[0])
153153
}
154154

155-
if ds.Url != "/abs_path" {
155+
if filepath.ToSlash(ds.Url) != "/abs_path" {
156156
t.Errorf("Expected url '/abs_path', got '%s'", ds.Url)
157157
}
158158
if ds.Format != duckdbType {
@@ -256,11 +256,11 @@ func TestFromDbtProfiles_BigQuery(t *testing.T) {
256256
if err != nil {
257257
t.Fatal(err)
258258
}
259-
defer func() {
260-
if err := os.RemoveAll(tempDir); err != nil {
261-
t.Logf("Failed to remove temporary directory %s: %v", tempDir, err)
262-
}
263-
}()
259+
defer func() {
260+
if err := os.RemoveAll(tempDir); err != nil {
261+
t.Logf("Failed to remove temporary directory %s: %v", tempDir, err)
262+
}
263+
}()
264264

265265
t.Run("service-account-json", func(t *testing.T) {
266266
keyfileContent := `{"type": "service_account", "project_id": "test-project", "private_key_id": "test-key-id", "private_key": "test-private-key", "client_email": "test-client-email", "client_id": "test-client-id", "auth_uri": "test-auth-uri", "token_uri": "test-token-uri", "auth_provider_x509_cert_url": "test-cert-url", "client_x509_cert_url": "test-client-cert-url"}` // #nosec G101

0 commit comments

Comments
 (0)