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

[C++] Implement safe casts for primitive types

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: C++
    • Labels:
      None

      Description

      In some situations, you want to cast the data in a PrimitiveArray to a different (but similar) data type, e.g. from uint32_t to int32_t or uint32_t to uint8_t. This can either be done by reinterpreting the data or needs to involve a copy if the size of the underlying type changes. There is already an implementation for this in parquet-cpp that could be pulled out into Arrow: https://github.com/apache/parquet-cpp/blob/9a0407e684c0a6299d0e6ab98c11c1162915c0ee/src/parquet/arrow/writer.cc#L71

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wesmckinn Wes McKinney
                Reporter:
                xhochy Uwe L. Korn
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: