-
Type:
Sub-task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Table SQL / API
-
Labels:None
For example, if we have two tables which have the same field name "int1" and want to join the two tables on this field:
val t1 = util.addTable[(Int, Long, String)]('int1, 'long1, 'string1) val t2 = util.addTable[(Int, Long, String)]('int1, 'long2, 'string2)
In SQL, we could do it as following:
SELECT xxx FROM t1 JOIN t2 ON t1.int1 = t2.int1
However, this is not possible in Table API. It lacks a way to specify a column from one table. We have to rename the field name from one table to make sure that all the field names are unique before joining them. This is very inconvenient.