Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,6 @@ jobs:
with:
version: v1.3.1

- name: Install iceberg-ctl Python dependencies
if: matrix.connector == 'materialize-s3-iceberg'
run: |
pip install --break-system-packages poetry
cd materialize-s3-iceberg/iceberg-ctl && poetry config virtualenvs.in-project true && poetry install

- name: Install system dependencies for Rust connectors
if: matrix.connector == 'materialize-kafka'
run: |
Expand Down Expand Up @@ -346,9 +340,6 @@ jobs:
]'), matrix.connector)

run: |
if [ "${{ matrix.connector }}" = "materialize-s3-iceberg" ]; then
export PYTHON_PATH=$(pwd)/materialize-s3-iceberg/iceberg-ctl/.venv/bin/python
fi
CONNECTOR=${{ matrix.connector }} VERSION=local tests/materialize/run.sh;

- name: Push ${{ matrix.connector }} image(s) with commit SHA tag
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ require (
github.com/estuary/flow v0.6.4
github.com/estuary/vitess v0.15.10
github.com/evanphx/json-patch/v5 v5.9.11
github.com/firebolt-db/firebolt-go-sdk v1.2.0
github.com/go-mysql-org/go-mysql v0.0.0-20250907131429-558ed11751bc
github.com/go-sql-driver/mysql v1.9.3
github.com/gogo/protobuf v1.3.2
Expand Down Expand Up @@ -124,6 +123,8 @@ require (
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/to v0.4.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/DataDog/zstd v1.5.7 // indirect
Expand All @@ -137,7 +138,6 @@ require (
github.com/apache/arrow/go/v15 v15.0.2 // indirect
github.com/apache/thrift v0.22.0 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/astaxie/beego v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect
Expand Down Expand Up @@ -199,6 +199,7 @@ require (
github.com/google/go-querystring v1.2.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/wire v0.7.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
github.com/googleapis/gax-go/v2 v2.18.0 // indirect
github.com/gookit/color v1.6.0 // indirect
Expand All @@ -224,7 +225,6 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.20 // indirect
Expand Down Expand Up @@ -271,7 +271,6 @@ require (
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
Expand All @@ -289,6 +288,7 @@ require (
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
gocloud.dev v0.44.0 // indirect
golang.org/x/mod v0.34.0 // indirect
golang.org/x/net v0.52.0 // indirect
golang.org/x/sys v0.42.0 // indirect
Expand Down
122 changes: 8 additions & 114 deletions go.sum

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion go/schema-gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ func GenerateSchema(title string, configObject interface{}) *jsonschema.Schema {

// walkSchema invokes visit on every property of the root schema, and then traverses each of these
// sub-schemas recursively. The visit function should modify the provided schema in-place to
// accomplish the desired transformation.
// accomplish the desired transformation. OneOf and AnyOf branches are also traversed, so that
// fixups apply to nullable-wrapped fields (where invopop emits oneOf: [original, {type:null}]).
func walkSchema(root *jsonschema.Schema, visits ...func(t *jsonschema.Schema)) {
if root.Properties != nil {
for pair := root.Properties.Oldest(); pair != nil; pair = pair.Next() {
Expand All @@ -42,6 +43,18 @@ func walkSchema(root *jsonschema.Schema, visits ...func(t *jsonschema.Schema)) {
walkSchema(pair.Value, visits...)
}
}
for _, branch := range root.OneOf {
for _, visit := range visits {
visit(branch)
}
walkSchema(branch, visits...)
}
for _, branch := range root.AnyOf {
for _, visit := range visits {
visit(branch)
}
walkSchema(branch, visits...)
}
}

func fixSchemaFlagBools(flagKeys ...string) func(t *jsonschema.Schema) {
Expand Down
25 changes: 19 additions & 6 deletions go/writer/parquet.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"math"
"math/big"
"os"
"regexp"
"slices"
"strconv"
"strings"
Expand Down Expand Up @@ -754,16 +755,28 @@ func getUuidVal(val any) (got parquet.FixedLenByteArray, err error) {
return
}

// dateLikeRe matches date strings with any number of year digits. Used as a
// fallback when time.Parse rejects > 4-digit years.
var dateLikeRe = regexp.MustCompile(`^(\d+)-(\d{2})-(\d{2})$`)

func getDateVal(val any) (got int32, err error) {
switch v := val.(type) {
case string:
if d, parseErr := time.Parse(time.DateOnly, v); parseErr != nil {
err = fmt.Errorf("unable to parse string %q as time.DateOnly: %w", v, parseErr)
} else {
unixSeconds := d.Unix()
unixDays := unixSeconds / 60 / 60 / 24
got = int32(unixDays)
d, parseErr := time.Parse(time.DateOnly, v)
if parseErr != nil {
m := dateLikeRe.FindStringSubmatch(v)
if m == nil {
err = fmt.Errorf("unable to parse string %q as date: %w", v, parseErr)
return
}
year, _ := strconv.Atoi(m[1])
month, _ := strconv.Atoi(m[2])
day, _ := strconv.Atoi(m[3])
d = time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC)
}
unixSeconds := d.Unix()
unixDays := unixSeconds / 60 / 60 / 24
got = int32(unixDays)
default:
err = fmt.Errorf("getDateVal unhandled type: %T", v)
}
Expand Down
Loading
Loading