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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7.0, 0.8.0
    • Fix Version/s: 1.2.0
    • Labels:
      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

            People

            • Assignee:
              dragoncurve Adam Gilmore
              Reporter:
              dragoncurve Adam Gilmore

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment