ARROW-7289: [C#] ListType constructor argument is redundant#5931
ARROW-7289: [C#] ListType constructor argument is redundant#5931HashidaTKS wants to merge 2 commits intoapache:masterfrom
Conversation
|
sorry, I'll fix the commit history. |
c853131 to
41c9b18
Compare
|
I fixed it. |
There was a problem hiding this comment.
Can this constructor just call into the constructor above? Similar to the way it works in C++:
Lines 591 to 597 in 81909dc
There was a problem hiding this comment.
Thanks for your suggestion.
I modified it.
kou
left a comment
There was a problem hiding this comment.
It almost looks good to me.
Could you also check my comments?
There was a problem hiding this comment.
Should we throw an exception for null valueDataType?
NullType isn't usable.
@eerhardt What do you think about this?
There was a problem hiding this comment.
The line was removed by the new commit but same check exists in Field.
Should we throw an exception there?
https://github.com/apache/arrow/blob/master/csharp/src/Apache.Arrow/Field.cs#L44
There was a problem hiding this comment.
I don't see this behavior in either the C++ or Java implementation.
I'd say it is up to you whether to leave the Field constructor as-is, or change it to throw on a null type. I could go either way on it.
There was a problem hiding this comment.
OK. We can do it as a follow-up task when we want to do.
We can merge this.
There was a problem hiding this comment.
It seems that int64 case is redundant.
Should we check both string and int64 cases?
There was a problem hiding this comment.
Indeed, I remove it.
Separate ListType constructor
* call another constructor * remove redundant test
b6e0d0e to
f6801dd
Compare
eerhardt
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks @HashidaTKS!
ListType constructor is redundant and should be seperated.