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

Arguments of SQL function call should not be named expressions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Function argument should not be named expressions. It could cause misleading error message.

      spark-sql> select count(distinct c1, distinct c2) from t1;
      
      Error in query: cannot resolve '`distinct`' given input columns: [c1, c2]; line 1 pos 26;
      'Project [unresolvedalias('count(c1#30, 'distinct), None)]
      +- SubqueryAlias t1
         +- CatalogRelation `default`.`t1`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c1#30, c2#31]
      

        Attachments

          Activity

            People

            • Assignee:
              smilegator Xiao Li
              Reporter:
              smilegator Xiao Li
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: