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

[Rust]: From<ArrayDataRef> implementations should validate data type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 1.0.1
    • None
    • Rust
    • None

    Description

      See https://github.com/apache/arrow/blob/ac86123a3f013ba1eeac2b66c2ccd00810c67871/rust/arrow/src/array/array.rs#L870

      The implementation currently does not validate that the datatype of the ArrayData argument matches. This can lead to inconsistencies, for example it is possible to create a TimestampMillisecondArray whose datatype reports Float64.

      A similar onconsistentcy could arise when trying to convert between types like

      let keys: Int32Array = dict_array.data().into() 

      Here keys.data_type() would still return Dictionary

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhorstmann Jörn Horstmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: