Repository navigation
feat: support automatic schema creation in Session - #18890
Merged
Merged
Conversation
shizy818
force-pushed
the
enable_auto_create_schema
branch
from
October 16, 2026 00:26
6bc217d to
4a69937
Compare
JackieTien97
requested changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a session-level switch, enableAutoCreateSchema, to Session.Builder, TableSessionBuilder, and TableSessionPoolBuilder. The option defaults to true for backward compatibility and is propagated to the server during session establishment. During table schema validation, automatic table and column creation is allowed only when both the server-level configuration and the session-level option are enabled. Integration tests cover writes to missing tables and columns when automatic schema creation is disabled.
enableAutoCreateSchema is intentionally not included in SessionInfo serialization or deserialization. The option is only consumed during coordinator-side schema validation, before fragment instances or schema plan nodes are dispatched to other nodes, so remote execution does not require it. Keeping the existing serialization layout also avoids changing the internal wire format, which could cause field misalignment and compatibility issues during rolling upgrades in a mixed-version cluster. Deserialized SessionInfo instances therefore retain the default value of true, which does not affect execution because schema auto-creation decisions have already been completed on the coordinator.
Content1 ...
Content2 ...
Content3 ...
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR