Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use is_top = FALSE as default #400

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Use is_top = FALSE as default #400

merged 1 commit into from
Nov 15, 2022

Conversation

eutwt
Copy link
Collaborator

@eutwt eutwt commented Nov 15, 2022

The example below doesn't work in main because is_top is passed around the squash functions and remains TRUE all along. I think these situations will be avoided if we default to is_top = FALSE, and only set is_top = TRUE from capture_dots() and capture_new_vars().

tibble(x = c(NA, 1), y = c(2, NA)) %>% 
  lazy_dt() %>% 
  summarise(z = replace_na(pick(x, y)))
#> Source: local data table [2 x 1]
#> Call:   `_DT3`[, .(z = fcoalesce(data.table(x = x, y = y)))]
#> 
#>       z
#>   <dbl>
#> 1     2
#> 2     1
#> 
#> # Use as.data.table()/as.data.frame()/as_tibble() to access results

This was prompted by a missed case that should have had `is_top =
FALSE`
@eutwt eutwt requested a review from markfairbanks November 15, 2022 19:05
@eutwt eutwt merged commit d901487 into main Nov 15, 2022
@eutwt eutwt deleted the default-is_top=FASLE branch November 30, 2022 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants