Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2361

Column aliases cannot include dots

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.7.0, 0.8.0
    • 1.2.0
    • None

    Description

      The Drill query engine rejects column aliases for aggregates or group by fields where the alias includes a dot.

      For example:

      select count(*) as `test.field` from cp.`employee.json`;

      throws an error with "Field references must be singular names."

      Having reviewed the code, I can't quite see a reason for it, and when using FieldReference.getWithQuotedRef instead in AggPrelBase, the issue is alleviated with no visible side effects.

      I'm sure there was a reason for this code in FieldReference, but I can't seem to work out why, and it seems entirely reasonable to allow a dot in a column alias.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dragoncurve Adam Gilmore
            dragoncurve Adam Gilmore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment