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

Arguments of SQL function call should not be named expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • 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

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: