Skip to content

Fix BIT value conversion - #83

Merged
nickvanw merged 1 commit into
mainfrom
fix/bit-value-conversion
Jun 16, 2026
Merged

nickvanw merged 1 commit into
mainfrom
fix/bit-value-conversion

Conversation

@nickvanw

Copy link
Copy Markdown
Contributor

Summary

  • decode Vitess BIT raw bytes as unsigned big-endian values instead of signed varints
  • return clear errors when BIT values cannot fit the signed Fivetran LONG representation
  • add focused converter coverage for one-byte, multibyte, high-bit, and overflow cases

Evidence

Vitess exposes MySQL BIT columns as querypb.Type_BIT and VStream row values carry the raw bit bytes. In upstream Vitess, BIT is not an integral sqltypes.Value, so this connector takes the raw-byte branch. Go binary.Varint decodes a different signed varint format, causing values like 0x01, 0x80, and 0xff to serialize incorrectly or fail.

Validation

  • GOCACHE=/tmp/fivetran-bugbash.qcjUz1/gocache go test ./cmd/internal/server/handlers
  • git diff --check

@nickvanw
nickvanw merged commit e57a871 into main Jun 16, 2026
7 checks passed
@nickvanw
nickvanw deleted the fix/bit-value-conversion branch June 16, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants