Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20787 Improve the Table API to make it usable
  3. FLINK-18679

It doesn't support to join two tables containing the same field names in Table API

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dian.fu Dian Fu
            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: