[SNOW-3249917] JDBC removal Step 8b: Replicate SnowflakeFileTransferMetadataV1, ObjectMapperFactory, expand SqlState#1121
Open
sfc-gh-ggeng wants to merge 2 commits intomasterfrom
Open
Conversation
sfc-gh-alhuang
approved these changes
Mar 27, 2026
dafed99 to
da481d4
Compare
9cdb0d1 to
5cde2f9
Compare
…FileEncryptionMaterial Verbatim replication of two data classes from JDBC: - StageInfo (229 lines) — stage descriptor with StageType enum, credentials, region, endpoint, presigned URL. @SnowflakeJdbcInternalApi removed. - RemoteStoreFileEncryptionMaterial (46 lines) — encryption key holder. From snowflake-common (decompiled, no public source). Import swaps deferred — StageInfo is tightly coupled with SnowflakeFileTransferMetadataV1 (metadata.getStageInfo() returns JDBC's StageInfo). Both must be swapped together in Step 8b. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5cde2f9 to
19baea1
Compare
…etadataV1, ObjectMapperFactory, expand SqlState Verbatim replication of three more classes from JDBC: - SnowflakeFileTransferMetadataV1 (109 lines) — file transfer metadata, depends on StageInfo/RemoteStoreFileEncryptionMaterial/CommandType (all replicated in previous steps) - SnowflakeFileTransferMetadata (interface) — return type for getFileTransferMetadatas - ObjectMapperFactory (38 lines) — singleton ObjectMapper factory with configurable max string length. SystemUtil.convertSystemPropertyToIntValue inlined. Also expanded SqlState with all constants needed by ErrorCode (previously only had SYSTEM_ERROR and INTERNAL_ERROR). Import swaps deferred — StageInfo/SnowflakeFileTransferMetadataV1/ RemoteStoreFileEncryptionMaterial are tightly coupled across InternalStage (which still needs JDBC types for the uploadWithoutConnection path). All types will be swapped together when the upload path is replaced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
da481d4 to
6ed462b
Compare
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.
Summary
Verbatim replication of three more classes from JDBC:
SnowflakeFileTransferMetadataV1(109 lines) — file transfer metadata, depends on StageInfo/RemoteStoreFileEncryptionMaterial/CommandType (all replicated in prior steps)SnowflakeFileTransferMetadata(interface) — return type forgetFileTransferMetadatasObjectMapperFactory(38 lines) — singleton ObjectMapper factory with configurable max string length.SystemUtil.convertSystemPropertyToIntValueinlined.Also expanded
SqlStatewith all constants needed byErrorCode(previously only hadSYSTEM_ERRORandINTERNAL_ERROR).Import swaps deferred — all types tightly coupled across InternalStage's JDBC upload path. Will be swapped together in Step 8c.
Stacked on #1120.
Replication Verification Diff Report
SnowflakeFileTransferMetadataV1
JDBC source :
net/snowflake/client/jdbc/SnowflakeFileTransferMetadataV1.java@ v3.25.1Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/SnowflakeFileTransferMetadataV1.javaPermitted differences (mechanical):
SnowflakeUtil.isNullOrEmpty→StorageClientUtil.isNullOrEmptyStageInfo,RemoteStoreFileEncryptionMaterial,CommandType→ ingest versions (same package)Unexpected differences: NONE
SnowflakeFileTransferMetadata
JDBC source :
net/snowflake/client/jdbc/SnowflakeFileTransferMetadata.java@ v3.25.1Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/SnowflakeFileTransferMetadata.javaUnexpected differences: NONE
ObjectMapperFactory
JDBC source :
net/snowflake/client/core/ObjectMapperFactory.java@ v3.25.1Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/ObjectMapperFactory.javaPermitted differences (mechanical):
@SnowflakeJdbcInternalApiannotations removedSystemUtil.convertSystemPropertyToIntValueinlined (avoids replicating SystemUtil)Unexpected differences:
convertSystemPropertyToIntValueinlined as private method — safe, identical logicSqlState (expanded)
JDBC source :
net/snowflake/client/jdbc/internal/snowflake/common/core/SqlState.java(from snowflake-common)Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/SqlState.javaAdded 15 constants needed by
ErrorCode. Values are standard ANSI SQL state codes.Test plan
mvn compiler:compilepasses./format.shpasses🤖 Generated with Claude Code