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

[C++][Compute] Overhaul CanCast() helper function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • None
    • C++
    • None

    Description

      CanCast(const DataType& from, const DataType& to) is intended to return true iff a cast can be made between the provided types. Since it currently only consults the type_id of the types and the kernels implementing the casts, it will return true for some unsupported casts. For example: CanCast(*list(null()), *list(list(int32()))) currently returns true, even though that cast is not supported. It would also be useful to provide an overloads to specify  restrictions on a cast; for example CanCast(int32(), int8(), guaranteed_safe) would return false since int32 may overflow when cast to int8

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: