-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fails if invalid custom types are specified #84
Fails if invalid custom types are specified #84
Conversation
3140d0c
to
d73d3ce
Compare
d73d3ce
to
3790e3b
Compare
@@ -26,5 +26,5 @@ tables: | |||
- name: "FullTypes" | |||
columns: | |||
FTInt: "int32" | |||
FTInitNull: "uint64" | |||
FTIntNull: "uint64" |
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.
I've fixed this typo then it raises an error since yo tries to convert spanner.NullInt64
into uint64
. What should I do to resolve the problem? 🤔
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.
hmm, it seems broken in this type conversion. Please just remove this line from the yaml for now.
v2/loader/loader.go
Outdated
|
||
// validate custom type columns | ||
if columnTypes != nil { | ||
columnSet := map[string]bool{} |
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.
super nit: good to use map[string]struct{}{}
when the value is meaningless, then substitute struct{}{}
instead of true
@kazegusuri Updated it! Would you review the PR again? 🙏 |
Please read the contribution guidelines and the CLA carefully before
submitting your pull request.
https://cla.developers.google.com/
Currently, the
yo
command succeeds even if non-existing custom type tables or columns are specified. This behavior makes it hard for users to notice misconfiguration in their custom types. It would be great ifyo
would validate their existence so I implemented the logic. Thank you for your review!