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

[R] Aggregation on expression doesn't NSE correctly

    XMLWordPrintableJSON

    Details

      Description

        expect_dplyr_equal(
          input %>%
            mutate(has_words = nchar(verses) < 0) %>%
            group_by(some_grouping) %>%
            summarize(all(has_words)) %>%
            arrange(some_grouping) %>%
            collect(),
          tbl
        )
      

      works, but if you define the expression inline, it doesn't:

        expect_dplyr_equal(
          input %>%
            group_by(some_grouping) %>%
            summarize(has_words = all(nchar(verses) < 0)) %>%
            arrange(some_grouping) %>%
            collect(),
          tbl
        )
      

      The error you get I think means that base::nchar is being called. I'm not sure if this is a general issue with our nse_funcs calling other nse_funcs, or if this is about the way the aggregation function environment is constructed separately, but it's not good.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                npr Neal Richardson
                Reporter:
                npr Neal Richardson
              • 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 - 0.5h
                  0.5h