Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3986

Provide config option to omit assigning an alias that is identical to its identifier.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The current alias assignment logic with the SqlValidator config option identifierExpansion() set to true will eagerly try to choose an alias, even if the alias name ends up being the same as the identifier itself. For example, it will assign the alias "foo" for the table "foo".

      It's nice to have alias assignment, but making it identical to the identifier doesn't always provide a whole lot of value and can make queries more verbose than they need to be.

      Suggest we add another SqlValidator config option (defaulted to the current behavior) to allow a caller to disable alias assignment in the cases that it would be identical to the identifier.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            dschmitt Drew Schmitt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: