Skip to content

Conversation

@siddharthteotia
Copy link
Contributor

@StevenMPhillips

Fixed the following:

(1) TestListVector.java doesn't include tests for nested lists where the underlying dataVector for a listVector is also a listVector.

(2) The copy test in TestListVector.java only checks the bit vector contents and doesn't verify the actual contents of list vector

@siddharthteotia
Copy link
Contributor Author

For some reason, git shows more diff in changes than I have actually made.

I have added lines 42, 96-115 and 457-572

however, git shows a lot of additional space/tab changes which I haven't really made

@wesm
Copy link
Member

wesm commented Aug 1, 2017

It looks like there's still a bunch of style issues in the codebase. Some time ago we added checkstyle checks but it's still showing a lot of warnings. It would be good to get checkstyle to a clean state cc @icexelloss

@siddharthteotia
Copy link
Contributor Author

thanks @wesm

In the latest commit, I have tried to get rid of most of the tab/space changes.

@icexelloss
Copy link
Contributor

@wesm, I can help with clean up the style. Track here: https://issues.apache.org/jira/browse/ARROW-1304

import org.junit.Test;

import java.util.List;
import java.util.ArrayList;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these two import switch order? sortImportsInGroupAlphabetically


/* index 0 */
Object result = accessor.getObject(0);
ArrayList<Long> resultSet = (ArrayList<Long>)result;
Copy link
Contributor

Choose a reason for hiding this comment

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

Need space between (ArrayList<Long>) and result

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, google_checks.xml doesn't specify TypecastParenPad rule, so this is fine.


assertEquals("Different data lengths at index: " + i + " and start: " + start,
dataLength1, dataLength2);
assertEquals("Different data lengths at index: " + i + " and start: " + start, dataLength1, dataLength2);
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is more than 100 length

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

assertEquals(4, resultSet.get(1).size()); /* size of second inner list */

list = resultSet.get(0);
assertEquals(new Long(50), (Long)list.get(0));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need to cast to Long here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed. Addressed

assertEquals(2, accessor.getValueCount());

/* get listVector value at index 0 -- the value itself is a listvector */
Object result = accessor.getObject(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated:

Is there a way to get unboxed value from nested list vector?

@StevenMPhillips
Copy link
Contributor

+1

@siddharthteotia
Copy link
Contributor Author

Addressed review comments in the latest commit.

@icexelloss
Copy link
Contributor

+1

@asfgit asfgit closed this in 25439e7 Aug 4, 2017
@siddharthteotia siddharthteotia deleted the ARROW-1300 branch August 7, 2017 20:25
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
@StevenMPhillips

Fixed the following:

(1) TestListVector.java doesn't include tests for nested lists where the underlying dataVector for a listVector is also a listVector.

(2) The copy test in TestListVector.java only checks the bit vector contents and doesn't verify the actual contents of list vector

Author: siddharth <[email protected]>

Closes apache#925 from siddharthteotia/ARROW-1300 and squashes the following commits:

584c79e [siddharth] ARROW-1300: Fix tests for ListVector
ff84253 [siddharth] ARROW-1300: Fix Tests for ListVector
9978199 [siddharth] ARROW-1300: Fix tests for ListVector
777e0de [siddharth] ARROW-1300: Fix Tests for ListVector
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

Successfully merging this pull request may close these issues.

4 participants