-
Notifications
You must be signed in to change notification settings - Fork 323
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
Introduce Value_Type.Null
, fix edge cases for read_many
#11737
base: develop
Are you sure you want to change the base?
Conversation
c57057b
to
22a2371
Compare
Changes affect Snowflake so I'm running the Extra suite:
I expect it to fail because it is failing on develop. Yet I want to see if there are no more failures than what is expected. |
@@ -628,6 +626,9 @@ make_custom_cast column target_value_type type_mapping = | |||
result = Ref.new Nothing |
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 find this logic hard to follow. The return value would be either Nothing
or the return value of result.put expr
-- but isn't the the return value of Ref.put
the old value?
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.
The return value of put
is discarded.
The function returns ref.get
at the very end.
I agree it is not ideal. This is a hack to get multiline if without adding a ton of indentation to the else
branches. There's just too many branches here (and while sometimes too many branches is bad, here it is just intrinsic to this function) to make it readable.
Once we get multiline if
(#6408) I will be more than happy to replace this with just:
if cond1 then
...
else if cond2 then
...
else
Nothing
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.
Do you think I should rewrite it with increasing indentation?
I'd rather keep it as is as IMO it is readable once the reasons are explained.
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 see, it makes more sense now.
distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Value_Type_Helpers.enso
Show resolved
Hide resolved
cb8fc47
to
2b94b24
Compare
I've rebased on latest develop and noticed there are some test failures because of other changes. I will try to fix these soon, but it shouldn't change the shape of the overall changes that much. |
@@ -628,6 +626,9 @@ make_custom_cast column target_value_type type_mapping = | |||
result = Ref.new Nothing |
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 see, it makes more sense now.
Pull Request Description
Value_Type.Null
. #6281Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.