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

ARROW-5884: [Java] Fix the get method of StructVector #4831

Closed
wants to merge 2 commits into from

Conversation

liyafan82
Copy link
Contributor

When the data at the specified location is null, there is no need to call the method from super to set the reader

holder.isSet = isSet(index);
super.get(index, holder);

@codecov-io
Copy link

codecov-io commented Jul 9, 2019

Codecov Report

Merging #4831 into master will increase coverage by 2.16%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4831      +/-   ##
=========================================
+ Coverage   87.44%   89.6%   +2.16%     
=========================================
  Files         997     662     -335     
  Lines      139804   96427   -43377     
  Branches     1418       0    -1418     
=========================================
- Hits       122246   86403   -35843     
+ Misses      17196   10024    -7172     
+ Partials      362       0     -362
Impacted Files Coverage Δ
cpp/src/arrow/io/readahead.cc 95.91% <0%> (-1.03%) ⬇️
r/src/recordbatch.cpp
r/R/Table.R
js/src/util/fn.ts
go/arrow/array/bufferbuilder.go
r/src/symbols.cpp
rust/datafusion/src/execution/projection.rs
rust/datafusion/src/execution/filter.rs
rust/arrow/src/csv/writer.rs
rust/datafusion/src/bin/main.rs
... and 326 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f767ce...0b8f798. Read the comment docs.

@@ -482,6 +482,9 @@ public Object getObject(int index) {
@Override
public void get(int index, ComplexHolder holder) {
holder.isSet = isSet(index);
if (holder.isSet == 0) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we null out reader here? Is this actually a bug? it seems different then #4543 since i doesn't look like an exception will be thrown by calling super.get below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. It should be nulled out.

As you have observed, it is different from #4543 as no exception is thrown. However, it is just useless to retrieve the reader by calling super.get.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I just don't know if there are some (bad) assumptions being made downstream by code someplace. CC @praveenbingo @pravindra if you don't have any objections please go ahead and merge (or I will merge tomorrow if I don't here any)

@emkornfield
Copy link
Contributor

+1, LGTM

kszucs pushed a commit that referenced this pull request Jul 22, 2019
When the data at the specified location is null, there is no need to call the method from super to set the reader

 holder.isSet = isSet(index);
 super.get(index, holder);

Author: liyafan82 <fan_li_ya@foxmail.com>

Closes #4831 from liyafan82/fly_0709_strnull and squashes the following commits:

0b8f798 <liyafan82>  Force the reader to be null
49148aa <liyafan82>  Fix the get method of StructVector
pprudhvi pushed a commit to pprudhvi/arrow that referenced this pull request Aug 11, 2019
When the data at the specified location is null, there is no need to call the method from super to set the reader

 holder.isSet = isSet(index);
 super.get(index, holder);

Author: liyafan82 <fan_li_ya@foxmail.com>

Closes apache#4831 from liyafan82/fly_0709_strnull and squashes the following commits:

0b8f798 <liyafan82>  Force the reader to be null
49148aa <liyafan82>  Fix the get method of StructVector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants