Skip to content

Commit

Permalink
Merge branch 'master-2.0.0' into SNOW-710476-bulk-update-more-features
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-hx authored Jan 6, 2025
2 parents bd88fe5 + b0e8734 commit 29c38a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/lib/ArrowChunkIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ ArrowChunkIterator::getCellAsInt64(size_t colIdx, int64 * out_data, bool rawData
return status;
}

if ((floatData > SF_INT64_MAX) || (floatData < SF_INT64_MIN))
if (floatData > static_cast<float64>(SF_INT64_MAX) || floatData < static_cast<float64>(SF_INT64_MIN))
{
m_parent->setError(SF_STATUS_ERROR_OUT_OF_RANGE,
"Value out of range for int64.");
Expand Down Expand Up @@ -408,7 +408,7 @@ ArrowChunkIterator::getCellAsInt64(size_t colIdx, int64 * out_data, bool rawData
case arrow::Type::type::DOUBLE:
{
double dblData = m_columns[colIdx].arrowDouble->Value(m_currRowIndexInBatch);
if ((dblData > SF_INT64_MAX) || (dblData < SF_INT64_MIN))
if (dblData > static_cast<float64>(SF_INT64_MAX) || dblData < static_cast<float64>(SF_INT64_MIN))
{
m_parent->setError(SF_STATUS_ERROR_OUT_OF_RANGE,
"Value out of range for int64.");
Expand Down Expand Up @@ -542,7 +542,7 @@ ArrowChunkIterator::getCellAsUint64(size_t colIdx, uint64 * out_data)
case arrow::Type::type::DOUBLE:
{
double dblData = m_columns[colIdx].arrowDouble->Value(m_currRowIndexInBatch);
if ((dblData > SF_UINT64_MAX) || (dblData < SF_INT64_MIN))
if (dblData > static_cast<double>(SF_UINT64_MAX) || dblData < static_cast<double>(SF_INT64_MIN))
{
m_parent->setError(SF_STATUS_ERROR_OUT_OF_RANGE,
"Value out of range for uint64.");
Expand Down

0 comments on commit 29c38a8

Please sign in to comment.