Skip to content

Commit

Permalink
Merge branch 'master' into SNOW-1016469-Update-Javadocs-With-missing-…
Browse files Browse the repository at this point in the history
…comments
  • Loading branch information
sfc-gh-ext-simba-jf authored Nov 6, 2024
2 parents 5d53094 + fd0ddd5 commit eb4969b
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 eb4969b

Please sign in to comment.