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

[Rust][DataFusion] Add coercion support for `NULL` literals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • Rust - DataFusion
    • None

    Description

      As we observed in https://github.com/apache/arrow/pull/9565#discussion_r586347165 datafusion won't coerce null literals, forcing strange syntax such as:

      ```
      rpad('hi', CAST(NULL AS INT), 'xy')

      We should add automatic coercion logic from the null literal to any type and this expression should work just fine (produce a NULL output)

      ```
      rpad('hi', NULL, 'xy')
      ```

      Attachments

        Activity

          People

            Unassigned Unassigned
            alamb Andrew Lamb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: