-
Notifications
You must be signed in to change notification settings - Fork 48
fix: Fix bug converting non-string labels to sql ids #296
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
Conversation
return col_ids, idx_ids | ||
|
||
|
||
def label_to_identifier(label: typing.Hashable, strict: bool = False) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have unit tests on these utils methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since utils are not part of the public API, I would prefer to test them via the public APIs that use them. I tried to include some unusual labels in the test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, let's add these two kinds of labels to test the strict mode:
- Leading spaces followed by alpha-numeric
- Leading spaces followed by
_
return col_ids, idx_ids | ||
|
||
|
||
def label_to_identifier(label: typing.Hashable, strict: bool = False) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, let's add these two kinds of labels to test the strict mode:
- Leading spaces followed by alpha-numeric
- Leading spaces followed by
_
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕