You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Al Taylor <al...@googlemail.com.INVALID> on 2021/07/23 11:49:14 UTC

[Java] Is hardcoding NullVector .getField() intentional?

Hi,

I recently encountered the fact that the .getField() method of NullVector returns a Field with a hardcoded name. https://github.com/apache/arrow/blob/apache-arrow-5.0.0/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L66

This is currently hardcoded to   

public static final String DATA_VECTOR_NAME = "$data$";

Is this intentional?
This means that one wouldn't be able reconstruct a usable schema from a list of FieldVectors, for example.

Thanks,

Al

Re: [Java] Is hardcoding NullVector .getField() intentional?

Posted by Fan Liya <li...@gmail.com>.
Hi AI,

I understand your concern. It makes sense to me.
I am not aware of any special reason for this. So if there are no
objections, I think it would be reasonable to change this to make the
NullVector consistent with other vectors.

Best,
Liya Fan


On Fri, Jul 23, 2021 at 8:26 PM Al Taylor
<al...@googlemail.com.invalid> wrote:

> Hi,
>
> I recently encountered the fact that the .getField() method of NullVector
> returns a Field with a hardcoded name.
> https://github.com/apache/arrow/blob/apache-arrow-5.0.0/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L66
>
> This is currently hardcoded to
>
> public static final String DATA_VECTOR_NAME = "$data$";
>
> Is this intentional?
> This means that one wouldn't be able reconstruct a usable schema from a
> list of FieldVectors, for example.
>
> Thanks,
>
> Al
>