Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5894

Table versus Table Full Outer join on Salted tables not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0.0
    • 4.17.0, 5.2.0, 5.1.3
    • core
    • None

    Description

      Trying to do a Full Outer Join on two tables. The operation works when the tables are not salted but fails with an exception related to casting when performed on the salted versions of the tables. Here is the exceptions:

      "java.lang.ClassCastException: org.apache.phoenix.schema.PColumnImpl cannot be cast to org.apache.phoenix.schema.ProjectedColumn
              at org.apache.phoenix.compile.JoinCompiler.joinProjectedTables(JoinCompiler.java:1256)
              at org.apache.phoenix.compile.QueryCompiler.compileJoinQuery(QueryCompiler.java:425)
              at org.apache.phoenix.compile.QueryCompiler.compileJoinQuery(QueryCompiler.java:228)
              at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:191)
              at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:153)
              at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:490)
              at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:456)
              at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:302)
              at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:291)
              at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:290)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:283)
              at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1830)
              at sqlline.Commands.execute(Commands.java:822)
              at sqlline.Commands.sql(Commands.java:732)
              at sqlline.SqlLine.dispatch(SqlLine.java:813)
              at sqlline.SqlLine.begin(SqlLine.java:686)
              at sqlline.SqlLine.start(SqlLine.java:398)
              at sqlline.SqlLine.main(SqlLine.java:291)"

      I have attached a word document with the complete list of queries and their results, along with commands to recreate the data.

       

      Attachments

        1. PHOENIX-5894.patch
          5 kB
          Rajeshbabu Chintaguntla
        2. Salt_Bucketed_Table_Full_Outer_Join_Issue.docx
          190 kB
          Ben Cohen

        Issue Links

          Activity

            People

              rajeshbabu Rajeshbabu Chintaguntla
              becohen Ben Cohen
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: