Skip to content

Regression with coalesce expr_fn function: can't take multiple arguments #10320

Closed

Description

@alamb

Describe the bug

Previously it could be called with multiple expressions like coalsce(vec![e1, e2]) however now it seems to require a single expressions

To Reproduce

Try to run coalsce(vec![e1, e2])

  --> iox_query_influxql/src/plan/planner_rewrite_expression.rs:327:58
    |
327 |                         Operator::Divide => yes(coalesce(vec![expr, lit(0_f64)])),
    |                                                 -------- ^^^^^^^^^^^^^^^^^^^^^^ expected `Expr`, found `Vec<Expr>`
    |                                                 |
    |                                                 arguments to this function are incorrect
    |
    = note: expected enum `datafusion::prelude::Expr`
             found struct `std::vec::Vec<datafusion::prelude::Expr>`

Expected behavior

We should be able to call it with multiple arguments

Additional context

@appletreeisyellow found this while updating InfluxDB IOx to the latest DataFusion version and identified the upstream PR #10201 / fe268bc brought in a regression.

Activity

  1. self-assigned this
    on Apr 30, 2024
  2. added
    regressionSomething that used to work no longer does
    on May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionSomething that used to work no longer does

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions