You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/03 09:11:50 UTC

[GitHub] [arrow] cyb70289 commented on a change in pull request #10859: ARROW-13534: [C++] Improve csv chunker

cyb70289 commented on a change in pull request #10859:
URL: https://github.com/apache/arrow/pull/10859#discussion_r681581313



##########
File path: cpp/src/arrow/csv/chunker.cc
##########
@@ -63,12 +63,18 @@ class Lexer {
       case IN_FIELD:
         goto InField;
       case AT_ESCAPE:
+        // will never reach here if escaping = false
+        // just to hint the compiler to remove dead code
+        if (!escaping) return nullptr;
         goto AtEscape;
       case IN_QUOTED_FIELD:
+        if (!quoting) return nullptr;
         goto InQuotedField;

Review comment:
       Compiler is not able to figure out this code path is impossible when template augment `quoting` is `false`.
   Adding this hint makes compiler eliminating unnecessary dead code.




-- 
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: github-unsubscribe@arrow.apache.org

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