Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6913

[R] Potential bug in compute.cc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.16.0
    • R

    Description

      Just spotted this compiler warning which looks like a real issue:

      compute.cpp: In function 'std::shared_ptr<arrow::ChunkedArray> ChunkedArray__Take(const std::shared_ptr<arrow::ChunkedArray>&, Rcpp::IntegerVector&)':
      compute.cpp:141:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
           if (min_i >= offset & max_i < offset + len) {
               ~~~~~~^~~~~~~~~
      

      In C++ the "&" operator has a lower priority than comparisons. You probably want to use the "&&" operator instead.

      cc romainfrancois npr

      Attachments

        Issue Links

          Activity

            People

              npr Neal Richardson
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h