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

[R] Warn only once about arrow function differences

    XMLWordPrintableJSON

Details

    Description

      When someone calls median or quantile, we warn them that it is approximate. When a session is interactive, this happens only the first time in interactive sessions for median and quantile https://github.com/apache/arrow/blob/d197ad31c3d7c16ecee74cb76a71ce397e905b3b/r/R/dplyr-summarize.R#L107-L111

      But when we test, the session is not interactive so we get a number of spurious extra warnings. Because of this we set a local testthat edition https://github.com/apache/arrow/blob/d197ad31c3d7c16ecee74cb76a71ce397e905b3b/r/tests/testthat/test-dplyr-summarize.R#L299-L301 which swallows any extra warnings.

      We can either only warn once regardless of interactivity (which is probably totally fine for these warnings), or we could use something like local_interactive in these tests so that we only get the first warning https://rlang.r-lib.org/reference/is_interactive.html

      Attachments

        Issue Links

          Activity

            People

              alistaire Edward Visel
              npr Neal Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 7h
                  7h