Skip to content

Improve consistency of expression names #3330

Description

@andygrove

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We have many different ways to create names from expressions with duplicated and sometimes inconsistent code.

Logical Expression:

  • Display trait
  • Debug trait
  • Expr.name() method (wrapper for create_name function)
  • ExprIdentifierVisitor::desc_expr

Physical Expression:

  • Display trait
  • Debug trait
  • create_physical_name function

One example of confusion is that queries sometimes result in field names containing Divide and sometimes /. For example:

  • decimal_simple.c1 / CAST(Float64(0.00001) AS Decimal128(5, 5)) uses /
  • CAST(decimal_simple.c1 AS Decimal128(30, 19)) Divide CAST(decimal_simple.c5 AS Decimal128(30, 19)) uses Divide

Describe the solution you'd like
Make names more consistent and avoid duplicate code

Describe alternatives you've considered
None

Additional context
None

Activity

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