Skip to content

Commit 3712b33

Browse files
authored
Fix CI (#3592)
#3573 didn't fully pass tests and the related gotestsum changes made it harder to grep for `FAIL:`. Fixing both
1 parent 3513748 commit 3712b33

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/flow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ jobs:
412412
./peer-flow worker &
413413
./peer-flow snapshot-worker &
414414
./peer-flow api --port 8112 --gateway-port 8113 &
415-
gotestsum --format standard-quiet --junitfile ../test-results.xml -- -cover -coverpkg github.com/PeerDB-io/peerdb/flow/... -p 32 ./... -timeout 900s -args -test.gocoverdir="$PWD/coverage"
415+
gotestsum --format standard-quiet --no-color --junitfile ../test-results.xml -- -cover -coverpkg github.com/PeerDB-io/peerdb/flow/... -p 32 ./... -timeout 900s -args -test.gocoverdir="$PWD/coverage"
416416
killall peer-flow
417417
sleep 1
418418
go tool covdata textfmt -i=coverage -o ../coverage.out

flow/connectors/snowflake/qrep.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,19 @@ func (c *SnowflakeConnector) getColsFromTable(ctx context.Context, tableName str
213213
if colType.String == "FIXED" {
214214
parsedColType = "NUMBER"
215215
}
216+
// Only use precision/scale for numeric types. For other types like TIME/TIMESTAMP,
217+
// the precision field in SHOW COLUMNS refers to fractional seconds, not numeric precision.
218+
precision := numericPrecision.Int32
219+
scale := numericScale.Int32
220+
if parsedColType != "NUMBER" {
221+
precision = 0
222+
scale = 0
223+
}
216224
cols = append(cols, SnowflakeTableColumn{
217225
ColumnName: colName.String,
218226
ColumnType: parsedColType,
219-
NumericPrecision: numericPrecision.Int32,
220-
NumericScale: numericScale.Int32,
227+
NumericPrecision: precision,
228+
NumericScale: scale,
221229
})
222230
}
223231

0 commit comments

Comments
 (0)