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

replacing hyphens in MockTableMeta cte_name #32

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

mcnick
Copy link
Collaborator

@mcnick mcnick commented Jan 10, 2024

What problem does this PR solve

Some table references can contain hyphens, e.g. when explicitly referencing BigQuery's project name. When creating mock data CTEs these hyphens are not replaced causing syntax errors.

What changed

Hyphens in MockTableMeta.cte_name are replaced by underscores.

Checklist

  • added tests for new functionality if applicable
    There was no test yet for the cte_name method and I didn't see the need in basically testing that the replace method works correctly. But let me know if I should add one.
  • added an entry for changes to the unreleased changes of CHANGELOG.md
  • added documentation for new functionality if applicable
  • have performed a self-review of my own code
  • have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

@Somtom Somtom self-requested a review January 11, 2024 08:03
Copy link
Collaborator

@Somtom Somtom left a comment

Choose a reason for hiding this comment

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

Thanks @mcnick - really good catch!

Maybe since we bumped into some issues now with the method, we should maybe have a test case that also explicitly tests the case you identified and fixed. Would you mind giving it a try for adding one?

@Somtom Somtom merged commit e61ad8d into DeepLcom:main Jan 11, 2024
3 checks passed
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