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-unsubscr...@orc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to