Skip to content

Conversation

@praveenbingo
Copy link
Contributor

  • Type was hard coded as 0,0
  • Use the input type for literals instead.

- Type was hard coded as 0,0
- Use the input type for literals instead.
@praveenbingo
Copy link
Contributor Author

@pravindra can you please review, CI failures look unrelated.

return std::make_shared<LiteralNode>(data_type, LiteralHolder((int64_t)0), true);
case arrow::Type::DECIMAL: {
DecimalScalar128 literal(0, 0);
std::shared_ptr<arrow::DecimalType> decimal_type =
Copy link
Contributor

@pravindra pravindra Jul 3, 2019

Choose a reason for hiding this comment

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

use checked_cast instead ?

auto decimal_type = arrow::internal::checked_pointer_cast<arrow::DecimalType>(data_type);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@codecov-io
Copy link

Codecov Report

Merging #4780 into master will increase coverage by 1.66%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4780      +/-   ##
==========================================
+ Coverage   87.41%   89.08%   +1.66%     
==========================================
  Files         996      719     -277     
  Lines      139489   100066   -39423     
  Branches     1418        0    -1418     
==========================================
- Hits       121938    89145   -32793     
+ Misses      17189    10921    -6268     
+ Partials      362        0     -362
Impacted Files Coverage Δ
cpp/src/gandiva/tree_expr_builder.cc 64.65% <100%> (+2.91%) ⬆️
cpp/src/gandiva/tests/decimal_test.cc 100% <100%> (ø) ⬆️
cpp/src/plasma/common.cc 76.19% <0%> (-12.28%) ⬇️
python/pyarrow/error.pxi 51.21% <0%> (-1.85%) ⬇️
cpp/src/arrow/status-test.cc 98.3% <0%> (-1.7%) ⬇️
cpp/src/arrow/status.h 95.5% <0%> (-0.38%) ⬇️
cpp/src/arrow/python/serialize.cc 89.61% <0%> (-0.33%) ⬇️
cpp/src/plasma/client.cc 97.1% <0%> (ø) ⬆️
python/pyarrow/__init__.py 40.54% <0%> (ø) ⬆️
cpp/src/plasma/common.h 100% <0%> (ø) ⬆️
... and 290 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 e70c3a7...2fa0eeb. Read the comment docs.

@pravindra pravindra closed this in e3ae1b0 Jul 4, 2019
kou pushed a commit that referenced this pull request Jul 4, 2019
- Type was hard coded as 0,0
- Use the input type for literals instead.

Author: Praveen <praveen@dremio.com>

Closes #4780 from praveenbingo/ARROW-5824 and squashes the following commits:

2fa0eeb <Praveen> Address review comments.
d56918c <Praveen> Fix lint issues.
41b1b0f <Praveen> ARROW-5824:  Fix decimal null literals.
kszucs pushed a commit that referenced this pull request Jul 22, 2019
- Type was hard coded as 0,0
- Use the input type for literals instead.

Author: Praveen <praveen@dremio.com>

Closes #4780 from praveenbingo/ARROW-5824 and squashes the following commits:

2fa0eeb <Praveen> Address review comments.
d56918c <Praveen> Fix lint issues.
41b1b0f <Praveen> ARROW-5824:  Fix decimal null literals.
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.

3 participants