Skip to content

ARROW-1949: [Python/C++] Add option to Array.from_pandas and pyarrow.array to perform unsafe casts - #2497

Closed
kszucs wants to merge 6 commits into
apache:masterfrom
kszucs:ARROW-1949
Closed

ARROW-1949: [Python/C++] Add option to Array.from_pandas and pyarrow.array to perform unsafe casts#2497
kszucs wants to merge 6 commits into
apache:masterfrom
kszucs:ARROW-1949

Conversation

@kszucs

Copy link
Copy Markdown
Member

No description provided.

Comment threadpython/pyarrow/array.pxi Outdated
DataType type,
CMemoryPool* pool, c_bool from_pandas):
DataType type, CMemoryPool* pool, c_bool from_pandas,
c_bool safe):

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

TODO: Implementation is missing from here

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

ConvertPySequence assumes strict conversion if datatype is explicitly passed.

@kszucskszucs changed the title WIP: ARROW-1949: [Python/C++] Add option to Array.from_pandas and pyarrow.array to perform unsafe castsARROW-1949: [Python/C++] Add option to Array.from_pandas and pyarrow.array to perform unsafe castsSep 2, 2018
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2497 into master will increase coverage by 1.27%.
The diff coverage is 64.1%.

Impacted file tree graph

@@ Coverage Diff @@## master #2497 +/- ##
==========================================
+ Coverage 86.17% 87.44% +1.27% 
==========================================
Files 308 246 -62 Lines 47102 43433 -3669 ==========================================
- Hits 40589 37980 -2609 + Misses 6439 5453 -986 + Partials 74 0 -74
Impacted FilesCoverage Δ
python/pyarrow/tests/test_array.py98.96% <100%> (+0.02%)⬆️
python/pyarrow/array.pxi68.93% <43.75%> (+0.36%)⬆️
cpp/src/arrow/python/numpy_to_arrow.cc93.53% <50%> (-0.58%)⬇️
rust/src/record_batch.rs
go/arrow/datatype_nested.go
rust/src/array.rs
go/arrow/math/uint64_amd64.go
go/arrow/internal/testing/tools/bool.go
go/arrow/internal/bitutil/bitutil.go
go/arrow/memory/memory_avx2_amd64.go
... and 56 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 c282a14...f352c47. Read the comment docs.

@kszucs
kszucs requested a review from xhochySeptember 3, 2018 12:03

@xhochyxhochy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM

@xhochyxhochy closed this in a712165Sep 4, 2018
@kszucs

Copy link
Copy Markdown
MemberAuthor

Thanks Uwe!

wesm pushed a commit that referenced this pull request Sep 8, 2018
…safe casts
Depends on both #2497 and #2503
Author: Krisztián Szűcs <szucs.krisztian@gmail.com>
Closes#2504 from kszucs/ARROW-2799 and squashes the following commits:
7bf9efd <Krisztián Szűcs> unsafe table creation during parquet dataset partitioning
38dfea3 <Krisztián Szűcs> disallow float truncation by default
515a393 <Krisztián Szűcs> Table.from_pandas safe option
2c82074 <Krisztián Szűcs> check-format
80e1478 <Krisztián Szűcs> lint
e0838ce <Krisztián Szűcs> wire CastOptions through the API
2961094 <Krisztián Szűcs> set allow_float_truncate true by default
194e476 <Krisztián Szűcs> allow truncate float option and its implementation
Sign up for freeto 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.

3 participants

@kszucs@codecov-io@xhochy