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 schema fixes #2019

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Arrow schema fixes #2019

merged 2 commits into from
Sep 12, 2023

Conversation

benjaminwinger
Copy link
Collaborator

Fixes #2005.

There were two different memory errors in the arrow schemer converter:

  1. Property names weren't being copied into the owned data part of the schema object and were just pointing to the DataTypeInfo object, which is temporary.
  2. The arrow schema wasn't getting released since it was skipping releasing the data if the release function was non-null instead of if it was null.

I've added a couple of relatively simple tests to do some basic validation of the data as well as to make sure that the address sanitizer checks those functions.

The property names were referencing temporary data

Also added tests
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 92.30% and project coverage change: -0.03% ⚠️

Comparison is base (510d804) 90.03% compared to head (2dcc60c) 90.00%.
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2019      +/-   ##
==========================================
- Coverage   90.03%   90.00%   -0.03%     
==========================================
  Files         903      909       +6     
  Lines       32922    32985      +63     
==========================================
+ Hits        29641    29688      +47     
- Misses       3281     3297      +16     
Files Changed Coverage Δ
src/common/arrow/arrow_converter.cpp 70.00% <88.88%> (+6.44%) ⬆️
tools/python_api/src_cpp/py_query_result.cpp 96.20% <100.00%> (+0.09%) ⬆️

... and 66 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andyfengHKU andyfengHKU merged commit 32f38fb into master Sep 12, 2023
10 checks passed
@andyfengHKU andyfengHKU deleted the arrow-schema-fix branch September 12, 2023 22:33
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.

Rust API test_arrow test fails due to Utf8Error on macos-11 GitHub-hosted runner
3 participants