[jira] [Commented] (SPARK-6273) Got error when one table's alias name is the same with other table's column name
[ https://issues.apache.org/jira/browse/SPARK-6273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15414706#comment-15414706 ] Dongjoon Hyun commented on SPARK-6273: -- It seems to be resolved in 1.3 according to SPARK-5278. Spark 2.0 also does not have this issue like the following. {code} scala> spark.version res0: String = 2.0.0 scala> spark.range(1).createOrReplaceTempView("t") scala> spark.range(1).createOrReplaceTempView("s") scala> sql("select * from t id, s").show +---+---+ | id| id| +---+---+ | 0| 0| +---+---+ scala> sql("select id.id, s.id from t id, s").show +---+---+ | id| id| +---+---+ | 0| 0| +---+---+ {code} > Got error when one table's alias name is the same with other table's column > name > > > Key: SPARK-6273 > URL: https://issues.apache.org/jira/browse/SPARK-6273 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 1.2.1, 1.3.1 >Reporter: Jeff > > while one table's alias name is the same with other table's column name > get the error Ambiguous references > {code} > Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: > Ambiguous references to salary.pay_date: > (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: > 'Filter 'salary.pay_date = 'time_by_day.the_date) && > ('time_by_day.the_year = 1997.0)) && ('salary.employee_id = > 'employee.employee_id)) && ('employee.store_id = 'store.store_id)) > Join Inner, None > Join Inner, None >Join Inner, None > MetastoreRelation yxqtest, time_by_day, Some(time_by_day) > MetastoreRelation yxqtest, salary, Some(salary) >MetastoreRelation yxqtest, store, Some(store) > MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) > Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: > Ambiguous references to salary.pay_date: > (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: > 'Filter 'salary.pay_date = 'time_by_day.the_date) && > ('time_by_day.the_year = 1997.0)) && ('salary.employee_id = > 'employee.employee_id)) && ('employee.store_id = 'store.store_id)) > Join Inner, None > Join Inner, None >Join Inner, None > MetastoreRelation yxqtest, time_by_day, Some(time_by_day) > MetastoreRelation yxqtest, salary, Some(salary) >MetastoreRelation yxqtest, store, Some(store) > MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-6273) Got error when one table's alias name is the same with other table's column name
[ https://issues.apache.org/jira/browse/SPARK-6273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14509164#comment-14509164 ] Shuai Zheng commented on SPARK-6273: I use 1.3.1, and I have similar issue. It is still there. And I am using purely DataFrame, spark SqlContext not HiveContext DataFrame df3 = df1.join(df2, df1.col(col).equalTo(df2.col(col))).select(col); because df1 and df2 join on the same key col, Then I can't reference the Exception in thread main org.apache.spark.sql.AnalysisException: Reference 'id' is ambiguous, could be: id#8L, id#0L.; It looks that joined key can't be referenced by name or by df1.col name pattern. The https://issues.apache.org/jira/browse/SPARK-5278 refer to a hive case, so I am not sure whether it is the same issue, but I still have the issue in latest code. Got error when one table's alias name is the same with other table's column name Key: SPARK-6273 URL: https://issues.apache.org/jira/browse/SPARK-6273 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 1.2.1 Reporter: Jeff while one table's alias name is the same with other table's column name get the error Ambiguous references {code} Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-6273) Got error when one table's alias name is the same with other table's column name
[ https://issues.apache.org/jira/browse/SPARK-6273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14360050#comment-14360050 ] saurabh bansal commented on SPARK-6273: --- there's a similar jira that is in resolved status..? https://issues.apache.org/jira/browse/SPARK-5278 Got error when one table's alias name is the same with other table's column name Key: SPARK-6273 URL: https://issues.apache.org/jira/browse/SPARK-6273 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 1.2.1 Reporter: Jeff while one table's alias name is the same with other table's column name get the error Ambiguous references {code} Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-6273) Got error when one table's alias name is the same with other table's column name
[ https://issues.apache.org/jira/browse/SPARK-6273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14360127#comment-14360127 ] Sean Owen commented on SPARK-6273: -- Yes, if it's really the same underlying cause, then this indicates it was already fixed. Are you able to check this against the latest code in master instead of 1.2.x? Got error when one table's alias name is the same with other table's column name Key: SPARK-6273 URL: https://issues.apache.org/jira/browse/SPARK-6273 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 1.2.1 Reporter: Jeff while one table's alias name is the same with other table's column name get the error Ambiguous references {code} Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) Error: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Ambiguous references to salary.pay_date: (pay_date#34749,List()),(salary#34792,List(pay_date)), tree: 'Filter 'salary.pay_date = 'time_by_day.the_date) ('time_by_day.the_year = 1997.0)) ('salary.employee_id = 'employee.employee_id)) ('employee.store_id = 'store.store_id)) Join Inner, None Join Inner, None Join Inner, None MetastoreRelation yxqtest, time_by_day, Some(time_by_day) MetastoreRelation yxqtest, salary, Some(salary) MetastoreRelation yxqtest, store, Some(store) MetastoreRelation yxqtest, employee, Some(employee) (state=,code=0) {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org