You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by ga...@apache.org on 2023/10/09 01:24:19 UTC
[orc] branch main updated: ORC-1500: [C++] The partition field does not support English special characters
This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 77555fd2b ORC-1500: [C++] The partition field does not support English special characters
77555fd2b is described below
commit 77555fd2b70d6e8ad2875636caa2caa24a58a50c
Author: kumonlin <61...@users.noreply.github.com>
AuthorDate: Mon Oct 9 09:24:05 2023 +0800
ORC-1500: [C++] The partition field does not support English special characters
### What changes were proposed in this pull request?
The URI encoding is deleted during the initialization of OrcHdfsFile
### Why are the changes needed?
For the context of [ORC-1500](https://issues.apache.org/jira/browse/ORC-1500), the C++ orc reader does not support the partition field containing English special characters. As a result, the SQL job fails to be executed and no execution result is displayed.
### How was this patch tested?
No new tests were added.
Closes #1609 from kumonlin/main.
Authored-by: kumonlin <61...@users.noreply.github.com>
Signed-off-by: Gang Wu <us...@gmail.com>
---
c++/src/OrcHdfsFile.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/c++/src/OrcHdfsFile.cc b/c++/src/OrcHdfsFile.cc
index 77f09a2a9..09ff71a0e 100644
--- a/c++/src/OrcHdfsFile.cc
+++ b/c++/src/OrcHdfsFile.cc
@@ -115,17 +115,17 @@ namespace orc {
}
hdfs::FileHandle* file_raw = nullptr;
- status = file_system->Open(uri.get_path(), &file_raw);
+ status = file_system->Open(uri.get_path(true), &file_raw);
if (!status.ok()) {
- throw ParseError("Can't open " + uri.get_path() + ". " + status.ToString());
+ throw ParseError("Can't open " + uri.get_path(true) + ". " + status.ToString());
}
// Wrapping file_raw into a unique pointer to guarantee deletion
file.reset(file_raw);
hdfs::StatInfo stat_info;
- status = file_system->GetFileInfo(uri.get_path(), stat_info);
+ status = file_system->GetFileInfo(uri.get_path(true), stat_info);
if (!status.ok()) {
- throw ParseError("Can't stat " + uri.get_path() + ". " + status.ToString());
+ throw ParseError("Can't stat " + uri.get_path(true) + ". " + status.ToString());
}
totalLength = stat_info.length;
}