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

Export table_path infrastructure #1458

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Export table_path infrastructure #1458

merged 3 commits into from
Feb 21, 2024

Conversation

hadley
Copy link
Member

@hadley hadley commented Feb 20, 2024

Fixes #1300

Includes some changes to make the interface a little nicer and to fix some issues I noticed while I was looking at this code with fresh eyes:

  • table_name() -> table_path_name()
  • is_table_id() requires characters and table_paths to be length 1
  • Vectorise table_path_components() instead of table_path_name()
  • Make table_path_components() an S3 generic (as an escape hatch if needed)

@mgirlich this is a first pass based on what I need for bigrquery. Is there anything obviously missing?

Fixes #1300

Includes some changes to make the interface a little nicer and to fix some issues I noticed while I was looking at this code with fresh eyes:

* `table_name()` -> `table_path_name()`
* `is_table_id()` requires characters and table_paths to be length 1
* Vectorise `table_path_components()` instead of `table_path_name()`
* Make `table_path_components()` an S3 generic (as an escape hatch if needed)
@hadley hadley requested a review from mgirlich February 20, 2024 21:55
table_path_components(table_path("`x.y`.`y.z`"), con),
list(c("x.y", "y.z"))
)
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add an expliciti test that table_path_components() is vectorised.

@mgirlich
Copy link
Collaborator

I don't see anything obvious missing.

@hadley hadley merged commit 5b07997 into main Feb 21, 2024
13 checks passed
@hadley hadley deleted the table-path-tools branch February 21, 2024 17:41
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.

Export <dbplyr_table_ident> tools
2 participants