Skip to content

Commit

Permalink
Merge pull request #457 from slingdata-io/v1.3.2
Browse files Browse the repository at this point in the history
V1.3.2
  • Loading branch information
flarco authored Dec 3, 2024
2 parents 986bd9d + 622c38b commit 53fd925
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.linux.amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ builds:
goos:
- linux
ldflags:
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}' -X 'github.com/slingdata-io/sling/agent.Version={{.Version}}'"

snapshot:
name_template: "{{ incpatch .Version }}"
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.linux.arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ builds:
goos:
- linux
ldflags:
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}} -X 'github.com/slingdata-io/sling/agent.Version={{.Version}}'"

snapshot:
name_template: "{{ incpatch .Version }}"
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ builds:
- darwin

ldflags:
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}' -X 'github.com/slingdata-io/sling/agent.Version={{.Version}}'"

universal_binaries:
- id: sling
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ builds:
- windows

ldflags:
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL={{.Env.PLAUSIBLE_URL}}' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn={{.Env.SENTRY_DSN}}' -X 'github.com/slingdata-io/sling/agent.Version={{.Version}}'"

snapshot:
name_template: "{{ incpatch .Version }}"
Expand Down
1 change: 1 addition & 0 deletions cmd/sling/tests/replications/r.07.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ defaults:
streams:
file://./cmd/sling/tests/files/parquet/*:
file://./cmd/sling/tests/files/*.csv:
columns: { "*": string }
file://./cmd/sling/tests/files/test?.json:
6 changes: 3 additions & 3 deletions cmd/sling/tests/replications/r.09.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ streams:
query: |
select
'{hook.hook1.connection}' as conn,
'${hook.hook1.columns}' as columns1,
'${hook.hook1.result.first.b}' as b,
'${hook.hook1.result.all}' as all_,
'{hook.hook1.columns}' as columns1,
'{hook.hook1.result.first.b}' as b,
'{hook.hook1.result.all}' as all_,
'{hook.previous.response.payload}' as response,
'{hook.public_my_table-post-01.request.url}' as request,
'{hook.previous.response.payload_json.status}' as response2
Expand Down
15 changes: 8 additions & 7 deletions core/dbio/iop/datastream.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,11 @@ func (ds *Datastream) Start() (err error) {
return g.Error(err, "need to define iterator")
}

castAllColumns := len(ds.Sp.Config.Columns) == 1 && ds.Sp.Config.Columns[0].Name == "*"
if SampleSize == 0 || castAllColumns {
goto skipBuffer
}

loop:
for ds.it.next() {
select {
Expand All @@ -698,12 +703,6 @@ loop:
default:
if ds.it.Counter == 1 && !ds.NoDebug {
g.Trace("%#v", ds.it.Row) // trace first row for debugging
} else if SampleSize == 0 {
// if sample size if zero, don't process rows
break loop
} else if cols := ds.Sp.Config.Columns; len(cols) == 1 && cols[0].Name == "*" && cols[0].IsString() {
// if specified to coerce all columns to string, don't process rows
break loop
}

row := ds.Sp.ProcessRow(ds.it.Row)
Expand All @@ -714,8 +713,10 @@ loop:
}
}

skipBuffer:

// infer types
if !ds.Inferred {
if !ds.Inferred && len(ds.Buffer) > 0 {
sampleData := NewDataset(ds.Columns)
sampleData.Rows = ds.Buffer
sampleData.NoDebug = ds.NoDebug
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.17.0
github.com/flarco/bigquery v0.0.9
github.com/flarco/g v0.1.131
github.com/flarco/g v0.1.132
github.com/getsentry/sentry-go v0.27.0
github.com/go-sql-driver/mysql v1.8.1
github.com/gobwas/glob v0.2.3
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build.linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go mod tidy

export VERSION=$1
echo "VERSION -> $VERSION"
go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$SENTRY_DSN'" -o sling cmd/sling/*.go
go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$SENTRY_DSN' -X 'github.com/slingdata-io/sling/agent.Version=$VERSION'" -o sling cmd/sling/*.go

./sling --version

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build.mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go mod tidy

export VERSION=$1
echo "VERSION -> $VERSION"
go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$SENTRY_DSN'" -o sling cmd/sling/*.go
go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$SENTRY_DSN' -X 'github.com/slingdata-io/sling/agent.Version=$VERSION'" -o sling cmd/sling/*.go

./sling --version

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build.win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ go mod edit -dropreplace='github.com/slingdata-io/sling' go.mod
go mod edit -droprequire='github.com/slingdata-io/sling' go.mod
go mod tidy

go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$env:VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$env:PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$env:SENTRY_DSN'" -o sling.exe github.com/slingdata-io/sling-cli/cmd/sling
go build -ldflags="-X 'github.com/slingdata-io/sling-cli/core.Version=$env:VERSION' -X 'github.com/slingdata-io/sling-cli/core/env.PlausibleURL=$env:PLAUSIBLE_URL' -X 'github.com/slingdata-io/sling-cli/core/env.SentryDsn=$env:SENTRY_DSN' -X 'github.com/slingdata-io/sling/agent.Version=$env:VERSION'" -o sling.exe github.com/slingdata-io/sling-cli/cmd/sling

.\sling.exe --version

Expand Down

0 comments on commit 53fd925

Please sign in to comment.