Skip to content

Refactor/2026 03 changing how result set data is stored#679

Merged
takapi327 merged 38 commits intoseries/0.7.xfrom
refactor/2026-03-Changing-how-ResultSet-data-is-stored
Mar 27, 2026
Merged

Refactor/2026 03 changing how result set data is stored#679
takapi327 merged 38 commits intoseries/0.7.xfrom
refactor/2026-03-Changing-how-ResultSet-data-is-stored

Conversation

@takapi327
Copy link
Owner

@takapi327 takapi327 commented Mar 21, 2026

Implementation Details

Refactored the design to change the internal data storage format of the ResultSet from decoded strings (Array[Option[String]]) to raw byte arrays (Array[Byte]), with decoding performed lazily when get*() methods are called.

In the previous implementation, when receiving row data from the MySQL server, the values of all columns were converted to the String type and stored. This approach had the following issues:

  • Memory efficiency: Although the binary protocol does not require intermediate string conversion, all columns were being converted to strings.
  • Unnecessary conversion overhead: When retrieving numeric values using getInt() or similar functions, a double conversion occurred: byte → string → numeric.
  • Duplication between Text and Binary protocols: Different decoding logic was scattered across both protocols.

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 takapi327 added this to the 0.7.0 milestone Mar 21, 2026
@takapi327 takapi327 self-assigned this Mar 21, 2026
@takapi327 takapi327 added 🔧 refactor Refactoring ldbc:connector Addition and modification of functionality to Connector projects labels Mar 21, 2026
@takapi327 takapi327 mentioned this pull request Mar 21, 2026
2 tasks
@takapi327 takapi327 merged commit 0c9ee1e into series/0.7.x Mar 27, 2026
37 checks passed
@takapi327 takapi327 deleted the refactor/2026-03-Changing-how-ResultSet-data-is-stored branch March 27, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ldbc:connector Addition and modification of functionality to Connector projects 🔧 refactor Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant