Skip to content

ARROW-11239: [Rust] Show some unit test failures#9193

Closed
mqy wants to merge 8 commits intoapache:masterfrom
mqy:ARROW-11239
Closed

ARROW-11239: [Rust] Show some unit test failures#9193
mqy wants to merge 8 commits intoapache:masterfrom
mqy:ARROW-11239

Conversation

@mqy
Copy link
Contributor

@mqy mqy commented Jan 13, 2021

This PR is used to demonstrate some test failures, but not intended to fix the problems.

@jorgecarleitao
Copy link
Member

I am aware of this, but I was unable to work on it. I can only work on this over this weekend :(

@github-actions
Copy link

@mqy mqy reopened this Jan 15, 2021
@mqy mqy changed the title ARROW-11239: [Rust] Demonstrate unit test failure on array::transform::tests::test_struct [WILL BE CLOSED] ARROW-11239: [Rust] Demonstrate unit test failures Jan 15, 2021
@mqy mqy changed the title ARROW-11239: [Rust] Demonstrate unit test failures ARROW-11239: [Rust] Some unit test failures Jan 15, 2021
@mqy
Copy link
Contributor Author

mqy commented Jan 15, 2021

Both ARROW-11239 and code of this PR were updated. It looks like the failures are relevant to ArrayData::slice()

@mqy mqy closed this Jan 15, 2021
array.data_type().clone(),
child_datum.null_buffer().is_some(),
));
let null_buffer = child_datum.null_buffer();
Copy link
Contributor Author

Choose a reason for hiding this comment

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


new_data.len = length;
new_data.offset = offset + self.offset;
self.copy_range(offset, 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.

This is the attempt to implement slice with MutableArrayData, but triggers ARROW-11263

@mqy mqy closed this Jan 16, 2021
@mqy mqy reopened this Jan 16, 2021
@mqy
Copy link
Contributor Author

mqy commented Jan 16, 2021

e20ee33 added new tests that passed locally.

@mqy mqy closed this Jan 16, 2021
@mqy mqy reopened this Jan 16, 2021
@mqy mqy closed this Jan 16, 2021
new_data
fn copy_range(&self, offset: usize, length: usize) -> ArrayData {
assert!((offset + length) <= self.len());
let arrays = vec![self];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps this hints the right direction:

  • Possible performance speedup because no longer clone all array data and use only part of it (think about the total length is large and the slice length very small)
  • Make the resulting ArrayData self-contained, thus less chances to mystery bugs. In this case, perhaps it's better to rename slice as copy_range to avoid mis-understanding.

The problem is: there are still 5 failures due to "not yet implemented" or "not supported"

Copy link
Contributor Author

@mqy mqy Jan 16, 2021

Choose a reason for hiding this comment

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

Possible performance speedup

Totally wrong, the benchmark of array_slice shows 4x - 11x regression.

@mqy mqy reopened this Jan 16, 2021
@mqy mqy changed the title ARROW-11239: [Rust] Some unit test failures ARROW-11239: [Rust] Show some unit test failures Jan 16, 2021
@mqy mqy closed this Jan 16, 2021
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.

2 participants