Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-727] Create table failed with TPCH partiton dataset, patch 2 #734

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ object ArrowUtils {
}

private def rewriteUri(encodeUri: String): String = {
val decodedUri = java.net.URLDecoder.decode(encodeUri, StandardCharsets.UTF_8.name())
val decodedUri = encodeUri
val uri = URI.create(decodedUri)
if (uri.getScheme == "s3" || uri.getScheme == "s3a") {
val s3Rewritten = new URI("s3", uri.getAuthority,
Expand All @@ -136,8 +136,8 @@ object ArrowUtils {
case "file" => "file"
}
val ssp = uri.getScheme match {
case "hdfs" => uri.getRawSchemeSpecificPart
case "file" => "//" + uri.getRawSchemeSpecificPart
case "hdfs" => uri.getSchemeSpecificPart
case "file" => "//" + uri.getSchemeSpecificPart
}
val rewritten = new URI(sch, ssp, uri.getFragment)
rewritten.toString
Expand Down