Skip to content

Show old values before new values #44

Closed

Description

@hadley

eg

  "  mf %>% mutate(z = is.na(x))"
  "Output"
  "  <SQL>"
+ "  SELECT `x`, CONVERT(BIT, IIF(~((`x`) IS NULL), 1, 0)) AS `z`"
- "  SELECT `x`, CONVERT(BIT, IIF(`x` IS NULL, 1, 0)) AS `z`"
  "  FROM `df`"

->

  "  mf %>% mutate(z = is.na(x))"
  "Output"
  "  <SQL>"
- "  SELECT `x`, CONVERT(BIT, IIF(`x` IS NULL, 1, 0)) AS `z`"
+ "  SELECT `x`, CONVERT(BIT, IIF(~((`x`) IS NULL), 1, 0)) AS `z`"
  "  FROM `df`"

Activity

  1. hadley commented on Oct 8, 2020

    @hadley
    MemberAuthor

    Need to carefully think about whether expect_snapshot() should be using diff() instead of compare().

  2. hadley commented on Oct 8, 2020

    @hadley
    MemberAuthor

    No, that's not it. It's an issue specifically with the display for widest data:

    x <- "this is a very very very very long sentence"
    waldo::diff(paste(x, c("a", "b", "c")), paste(x, c("a", "B", "c")))
    #> old vs new
    #>   "this is a very very very very long sentence a"
    #> + "this is a very very very very long sentence b"
    #> - "this is a very very very very long sentence B"
    #>   "this is a very very very very long sentence c"

    Created on 2020-10-08 by the reprex package (v0.3.0.9001)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions