[
https://issues.apache.org/jira/browse/ARROW-9355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Apache Arrow JIRA Bot reassigned ARROW-9355:
--------------------------------------------
Assignee: Apache Arrow JIRA Bot (was: Romain Francois)
> [R] Fix -Wimplicit-int-float-conversion
> ---------------------------------------
>
> Key: ARROW-9355
> URL: https://issues.apache.org/jira/browse/ARROW-9355
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Reporter: Neal Richardson
> Assignee: Apache Arrow JIRA Bot
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/arrow-00install.html
> {code}
> array_from_vector.cpp:332:53: warning: implicit conversion from
> 'std::__1::numeric_limits<long>::type' (aka 'long') to 'double' changes value
> from 9223372036854775807 to 9223372036854775808
> [-Wimplicit-int-float-conversion]
> if (x < std::numeric_limits<Target>::min() || x >
> std::numeric_limits<Target>::max()) {
> ~
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> array_from_vector.cpp:483:33: note: in instantiation of function template
> specialization 'arrow::internal::int_cast<double, long, 0>' requested here
> RETURN_NOT_OK(internal::int_cast(*p, &value));
> ^
> array_from_vector.cpp:463:16: note: in instantiation of function template
> specialization 'arrow::r::Unbox<arrow::Int64Type, void>::IngestRange<double>'
> requested here
> return IngestRange(builder, REAL(obj), XLENGTH(obj));
> ^
> array_from_vector.cpp:724:58: note: in instantiation of member function
> 'arrow::r::Unbox<arrow::Int64Type, void>::Ingest' requested here
> Status Ingest(SEXP obj) override { return
> Unbox<Type>::Ingest(typed_builder_, obj); }
> ^
> array_from_vector.cpp:879:5: note: in instantiation of member function
> 'arrow::r::TypedVectorConverter<arrow::Int64Type,
> arrow::r::NumericVectorConverter<arrow::Int64Type> >::Ingest' requested here
> NUMERIC_CONVERTER(INT64, Int64Type);
> ^
> array_from_vector.cpp:858:59: note: expanded from macro 'NUMERIC_CONVERTER'
> std::unique_ptr<NumericVectorConverter<TYPE>>(new
> NumericVectorConverter<TYPE>); \
> ^
> 1 warning generated.
> {code}
> Presumably this is fixable with an explicit cast?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)