Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9543

[C++] Simplify parsing/conversion utilities

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.17.1
    • None
    • C++

    Description

      Various improvement ideas extracted from https://github.com/apache/arrow/pull/7793 , see https://github.com/apache/arrow/commit/740d8132d3220b0bcddde138bd1ab70030e227fd

      • provide a convenience function FormatValue() to complement ParseValue()
      • parameterize both parsing and formatting with the corresponding DataType subclass (for example a formatting or parsing a timestamp requires a TimeUnit and this can be derived from a TimestampType)
      • rename StringConverter and StringFormatter to ParseValueTraits and FormatValueTraits, to emphasize the convenience functions as the preferred interface
      • ParseValue should accept a string_view for simplicity, and an overload should be provided which returns an optional<>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h