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

Empty array in composite type is wrongly treated as NULL if field's type is Option[List[A]] #490

Closed
danishin opened this issue Sep 19, 2020 · 2 comments

Comments

@danishin
Copy link

Empty array in composite type is wrongly treated as NULL if field's type is Option[List[A]]

For example,

case class FooComposite(optional_list1: Option[List[Int]]) extends Struct

FooComposite(None) // correctly returned as `()`
FooComposite(Some(List.empty)) // incorrectly returned as `()`
FooComposite(Some(List(1))) // correctly returned as `({})`

If I change type to List[A] then it works fine (return FooComposite(Some(List.empty)) as ({})).

tminglei added a commit that referenced this issue Sep 21, 2020
@tminglei
Copy link
Owner

@danishin I checked it with latest codes. It seems ok.
Maybe it was fixed by #488

@danishin
Copy link
Author

@tminglei That's great news. Thanks for the follow up!
Always appreciate your time and efforts to maintain this repo. It's been helping our company lots!

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

No branches or pull requests

2 participants