Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20311

SQL "range(N) as alias" or "range(N) alias" doesn't work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      None

      Description

      `select * from range(10) as A;` or `select * from range(10) A;`
      does not work.
      As a workaround, a subquery has to be used:
      `select * from (select * from range(10)) as A;`

        Attachments

          Activity

            People

            • Assignee:
              maropu Takeshi Yamamuro
              Reporter:
              juliuszsompolski Juliusz Sompolski
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: