Skip to content

Refactor MySQL column definition packet construction - #40585

Draft
iamhucong wants to merge 1 commit into
apache:masterfrom
iamhucong:refactor/mysql-column-definition-packet
Draft

iamhucong wants to merge 1 commit into
apache:masterfrom
iamhucong:refactor/mysql-column-definition-packet

Conversation

@iamhucong

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • Share MySQL column definition packet construction between query responses and prepared-statement projection metadata.
  • Preserve each path's existing character set and column type selection, including the existing TIME character set difference.
  • Extend projection metadata tests for TIME, binary columns, and column lengths.

Validation:

  • JDK 21: mvn -pl proxy/frontend/dialect/mysql -am -DskipITs -Dspotless.skip=true -Dtest=ResponsePacketBuilderTest,MySQLProjectionMetadataResolverTest -Dsurefire.failIfNoSpecifiedTests=false test — 72 tests passed.
  • Scoped spotless:check and checkstyle:check -Pcheck passed for all three changed Java files.
  • The full ./mvnw clean install -B -T1C -Pcheck build was not run.

AI assistance: OpenAI Codex assisted with the implementation and test updates in the MySQL frontend module.

@iamhucong

Copy link
Copy Markdown
Contributor Author

Result

Review Result: Mergeable

No blocking findings in the three-file code review. Both callers retain their existing character-set and column-type selection. The shared method writes the same fields, flags, and decimal precision.

Evidence

  • Query responses continue to use the binary character set for TIME. Prepared-statement metadata continues to use the session character set for TIME and the binary character set for binary columns.
  • The prepared-statement tests check the wire character set, column length, type, flags, and decimals.
  • JDK 21: all 72 tests in ResponsePacketBuilderTest and MySQLProjectionMetadataResolverTest passed. Scoped Spotless and Checkstyle passed on all three Java files.

Coverage

Reviewed df688f12d8f6 against 12d7a393989d. Verification covered the MySQL frontend and its source dependencies. The full repository build was outside this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant