Skip to content

Commit

Permalink
Merge branch 'SNOW-1016469-Update-Javadocs-With-missing-comments' of h…
Browse files Browse the repository at this point in the history
…ttps://github.com/snowflakedb/snowflake-jdbc into SNOW-1016469-Update-Javadocs-With-missing-comments
  • Loading branch information
sfc-gh-ext-simba-jf committed Nov 6, 2024
2 parents 7b61fac + eb4969b commit 284806e
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,13 @@ private void parseCommand() throws SnowflakeSQLException {

// get source file locations as array (apply to both upload and download)
JsonNode locationsNode = jsonNode.path("data").path("src_locations");
if (!locationsNode.isArray()) {
throw new SnowflakeSQLException(
queryID, ErrorCode.INTERNAL_ERROR, "src_locations must be an array");
}

queryID = jsonNode.path("data").path("queryId").asText();

assert locationsNode.isArray();

String[] src_locations;

try {
Expand Down Expand Up @@ -1460,7 +1462,13 @@ public static List<SnowflakeFileTransferMetadata> getFileTransferMetadatas(
}

// For UPLOAD we expect encryptionMaterial to have length 1
assert encryptionMaterial.size() == 1;
if (encryptionMaterial.size() != 1) {
throw new SnowflakeSQLException(
queryId,
ErrorCode.INTERNAL_ERROR,
"Encryption material for UPLOAD should have size 1 but have "
+ encryptionMaterial.size());
}

final Set<String> sourceFiles = expandFileNames(srcLocations, queryId);

Expand Down

0 comments on commit 284806e

Please sign in to comment.