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

[C++/Python] Casting float NaN to int should raise an error on safe cast

    XMLWordPrintableJSON

Details

    Description

      Currently the following code works:

      pa.array([np.nan, 1.]).cast(pa.int64())
      

      It produces:

      <pyarrow.lib.Int64Array object at 0x111ca6778>
      [
        -9223372036854775808,
        1
      ]
      

      The expected behaviour should be that it raises.

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              uwe Uwe Korn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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