From f1b3f3440d8a780422b794cbd2572b64bc6089a0 Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Thu, 10 Feb 2022 16:26:05 +0800 Subject: [PATCH] [NSE-727] Create table failed with TPCH partiton dataset, patch 2 --- .../sql/execution/datasources/v2/arrow/ArrowUtils.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala b/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala index b9227ad96..f6cc0303e 100644 --- a/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala +++ b/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala @@ -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, @@ -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