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

Fail to set Java VarCharVector #7786

Closed
miriambron opened this issue Jul 16, 2020 · 3 comments
Closed

Fail to set Java VarCharVector #7786

miriambron opened this issue Jul 16, 2020 · 3 comments

Comments

@miriambron
Copy link

miriambron commented Jul 16, 2020

While trying to use Jave VarCharVector safe set method,
seems that if the new value size is greater then the existing one,
the value is overriding the next bytes in the vector.

@miriambron miriambron changed the title Fail to set VarCharVector Fail to set Java VarCharVector Jul 16, 2020
@jacques-n
Copy link
Contributor

I think you have a misunderstanding of the expected use pattern of Arrow vectors. Variable-width vectors need to be populated in order. They are randomly-readable once populated but they are not randomly-writable.

For reference, at Dremio we did build a Arrow-vector like structure for doing what you want. You can see the code here: https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/org/apache/arrow/vector/MutableVarcharVector.java

@miriambron
Copy link
Author

Thanks for you answer, since I need to integrate with existing system I can't use another vector type, just to create new one.
I wonder if there is any documentation I could read this information before , since I didn't reach it

@jacques-n
Copy link
Contributor

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