ARROW-7215: [C++][Gandiva] Implement castVARCHAR(numeric_type) functions

This PR implements the castVARCHAR for numeric values inside the Gandiva.

It replaces the logic of the https://github.com/apache/arrow/pull/8158 PR  to change the function output to match the Java language patterns.

Closes #9816 from anthonylouisbsb/feature/fix-castvarchar-to-match-java-impl and squashes the following commits:

7df55a58d <Anthony Louis> Apply formatting changes
7a724c0fd <Anthony Louis> Remove unnecessary macros
4fb8a7f44 <Anthony Louis> Refactor if chain
e78705136 <Anthony Louis> Add test to infinity case
b62b856a0 <Anthony Louis> Add comments for changes
cec11bbf0 <Anthony Louis> Add tests to check Java compatibility
302139c78 <Anthony Louis> Add emit trailing point tests
efb94b901 <Anthony Louis> Add -0.0 inside cast test
523e60a56 <Anthony Louis> Add custom constructor inside the class
34f2f926d <Anthony Louis> Add class to print in formatted way
e244502b3 <Anthony Louis> Fix tests to consider java formatting
33bc5b2de <Projjal Chanda> added castvarchar(numeric_types) functions

Lead-authored-by: Anthony Louis <anthony@simbioseventures.com>
Co-authored-by: Projjal Chanda <iam@pchanda.com>
Signed-off-by: Praveen <praveen@dremio.com>
10 files changed
tree: 95dbbc567c790174ad915c59765f0933a713092b
  1. .github/
  2. c_glib/
  3. ci/
  4. cpp/
  5. csharp/
  6. dev/
  7. docs/
  8. format/
  9. go/
  10. java/
  11. js/
  12. julia/
  13. matlab/
  14. python/
  15. r/
  16. ruby/
  17. rust/
  18. .asf.yaml
  19. .clang-format
  20. .clang-tidy
  21. .clang-tidy-ignore
  22. .dir-locals.el
  23. .dockerignore
  24. .env
  25. .gitattributes
  26. .gitignore
  27. .gitmodules
  28. .hadolint.yaml
  29. .pre-commit-config.yaml
  30. .readthedocs.yml
  31. .travis.yml
  32. appveyor.yml
  33. CHANGELOG.md
  34. cmake-format.py
  35. CODE_OF_CONDUCT.md
  36. CONTRIBUTING.md
  37. docker-compose.yml
  38. header
  39. LICENSE.txt
  40. NOTICE.txt
  41. README.md
  42. run-cmake-format.py
README.md

Apache Arrow

Build Status Coverage Status Fuzzing Status License Twitter Follow

Powering In-Memory Analytics

Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable big data systems to process and move data fast.

Major components of the project include:

Arrow is an Apache Software Foundation project. Learn more at arrow.apache.org.

What's in the Arrow libraries?

The reference Arrow libraries contain many distinct software components:

  • Columnar vector and table-like containers (similar to data frames) supporting flat or nested types
  • Fast, language agnostic metadata messaging layer (using Google's Flatbuffers library)
  • Reference-counted off-heap buffer memory management, for zero-copy memory sharing and handling memory-mapped files
  • IO interfaces to local and remote filesystems
  • Self-describing binary wire formats (streaming and batch/file-like) for remote procedure calls (RPC) and interprocess communication (IPC)
  • Integration tests for verifying binary compatibility between the implementations (e.g. sending data from Java to C++)
  • Conversions to and from other in-memory data structures
  • Readers and writers for various widely-used file formats (such as Parquet, CSV)

Implementation status

The official Arrow libraries in this repository are in different stages of implementing the Arrow format and related features. See our current feature matrix on git master.

How to Contribute

Please read our latest project contribution guide.

Getting involved

Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved: