Skip to content

Use simpler schema names for expressions #3722

Closed as duplicate
Closed as duplicate

Description

@andygrove

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

We currently use overly verbose schema names for expressions. Here is an example comparing scalar function names between Postgres and DataFusion.

Postgres

postgres=# select concat(a, 'utf8', true, false, null, 1, 0.2) from t;select concat(a, 'utf8', true, false, null, 1, 0.2) from t;
   concat    
-------------
...

DataFusion

❯ select concat(a, 'utf8', true, false, null, 1, 0.2) from t;
+----------------------------------------------------------------------------------+
| concat(t.a,Utf8("utf8"),Boolean(true),Boolean(false),NULL,Int64(1),Float64(0.2)) |
+----------------------------------------------------------------------------------+
...

Describe the solution you'd like
Use simple names in schema - use the function name in this example and do not add the parameters.

Describe alternatives you've considered
None

Additional context
None

Activity

  1. comphead commented on Oct 12, 2022

    @comphead
    Contributor

    @andygrove I can take this, this requires change in planner and in zillion of tests

    Reg to repeated aliases like
    let sql = "SELECT COALESCE(NULL, 'test'), COALESCE(NULL, 'test')";

    we can add name col with some index like concat_0, concat_1 to prvent name collision

  2. andygrove commented on Nov 17, 2026

    @andygrove
    MemberAuthor

    Closing in favour of #3990, which was opened to hold the wider discussion of naming conventions for non-aliased columns and covers this case, along with the Postgres, Trino and Spark conventions and the duplicate-name issue that blocks it. Function names are still verbose on main (for example btrim(test.a,Utf8("ab"))), so the problem is still valid there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions