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

Spark SQL: cross join + two joins = BUG

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1, 2.1.0
    • SQL
    • None

    Description

      In spark shell :

      CREATE TABLE test (col INT) ;
      INSERT OVERWRITE TABLE test VALUES (1), (2) ;
      
      SELECT 
      COUNT(1)
      FROM test T1 
      CROSS JOIN test T2
      JOIN test T3
      ON T3.col = T1.col
      JOIN test T4
      ON T4.col = T1.col
      ;
      

      returns :

      Error in query: cannot resolve '`T1.col`' given input columns: [col, col]; line 6 pos 12
      

      Apparently, this example is minimal (removing the CROSS or one of the JOIN causes no issue).

      Attachments

        Issue Links

          Activity

            People

              hvanhovell Herman van Hövell
              fpin Furcy Pin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: