spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (SPARK-1354) Fail to resolve attribute when query with table name as a qualifer in SQLContext
Date Sun, 30 Mar 2014 07:17:14 GMT


ASF GitHub Bot commented on SPARK-1354:

GitHub user jerryshao opened a pull request:

    [SPARK-1354][SQL] Add tableName as a qualifier for SimpleCatelogy

    Fix attribute unresolved when query with table name as a qualifier in SQLContext with
SimplCatelog, details please see [SPARK-1354](

You can merge this pull request into a Git repository by running:

    $ git pull qualifier-fix

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #272
commit 795017045a671d0f3827a97b7d57db2980e8c1fd
Author: jerryshao <>
Date:   2014-03-30T02:58:21Z

    Add tableName as a qualifier for SimpleCatelogy


> Fail to resolve attribute when query with table name as a qualifer in SQLContext
> --------------------------------------------------------------------------------
>                 Key: SPARK-1354
>                 URL:
>             Project: Apache Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.0.0
>            Reporter: Saisai Shao
> For SQLContext with SimpleCatelog, table name does not register into attribute as a qualifier,
so query like "SELECT * FROM records JOIN records1 ON records.key = records1,key" will be
failed. The logical plan cannot resolve "records.key" because of missing qualifier "records".
The physical plan shows as below
>     Project [*]
>      Filter ('records.key = 'records1.key)
>       CartesianProduct
>        ExistingRdd [key#0,value#1], MappedRDD[2] at map at basicOperators.scala:124
>        ParquetTableScan [key#2,value#3], (ParquetRelation ParquetFile, pair.parquet),
> And the exception shows:
> org.apache.spark.sql.catalyst.errors.package$TreeNodeException: No function to evaluate
expression. type: UnresolvedAttribute, tree: 'records.key
>         at org.apache.spark.sql.catalyst.expressions.Expression.apply(Expression.scala:54)
>         at org.apache.spark.sql.catalyst.expressions.Equals.apply(predicates.scala:112)
>         at org.apache.spark.sql.execution.Filter$$anonfun$2$$anonfun$apply$1.apply(basicOperators.scala:43)
>         at org.apache.spark.sql.execution.Filter$$anonfun$2$$anonfun$apply$1.apply(basicOperators.scala:43)
>         at scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:390)
>         at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
>         at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
>         at scala.collection.Iterator$class.foreach(Iterator.scala:727)
>         at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
>         at org.apache.spark.rdd.RDD$$anonfun$foreach$1.apply(RDD.scala:643)
>         at org.apache.spark.rdd.RDD$$anonfun$foreach$1.apply(RDD.scala:643)
>         at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:936)
>         at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:936)
>         at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:111)
>         at
>         at org.apache.spark.executor.Executor$TaskRunner$$anonfun$run$1.apply$mcV$sp(Executor.scala:211)
>         at org.apache.spark.deploy.SparkHadoopUtil.runAsUser(SparkHadoopUtil.scala:46)
>         at org.apache.spark.executor.Executor$
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(
>         at java.util.concurrent.ThreadPoolExecutor$
>         at

This message was sent by Atlassian JIRA

View raw message