You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/11/08 03:54:34 UTC
[GitHub] [orc] wgtmac commented on a change in pull request #959: ORC-1047: [C++] Handle quoted field names during string schema parsing
wgtmac commented on a change in pull request #959:
URL: https://github.com/apache/orc/pull/959#discussion_r744389708
##########
File path: c++/src/TypeImpl.cc
##########
@@ -218,7 +227,19 @@ namespace orc {
if (i != 0) {
result += ",";
}
- result += fieldNames[i];
+ if (isUnquotedFieldName(fieldNames[i])) {
+ result += fieldNames[i];
+ } else {
+ std::string name(fieldNames[i]);
+ size_t pos = 0;
+ while ((pos = name.find("`", pos)) != std::string::npos) {
+ name.replace(pos, 1, "``");
Review comment:
If we call toString() to a type with quote and get a string. Can we call buildTypeFromString() on that string to get back the original type object?
##########
File path: c++/src/TypeImpl.cc
##########
@@ -678,79 +795,60 @@ namespace orc {
} else if (category == "date") {
return std::unique_ptr<Type>(new TypeImpl(DATE));
Review comment:
missing validatePrimitiveType before return
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org