You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Hans Deragon (JIRA)" <ji...@apache.org> on 2019/01/23 21:09:00 UTC

[jira] [Created] (PHOENIX-5110) java.lang.IllegalArgumentException when using hint with delete.

Hans Deragon created PHOENIX-5110:
-------------------------------------

             Summary: java.lang.IllegalArgumentException when using hint with delete.
                 Key: PHOENIX-5110
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5110
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.14.0
            Reporter: Hans Deragon


Running the following works:
{noformat}
jdbc:phoenix:> select /*+ USE_SORT_MERGE_JOIN */ * from mytable where not exists (select primarykey from mytable_staging where mytable.primarykey = mytable_staging.primarykey);
<WORKS> All rows that exist in mytable but do not exist in mytable_staging show up.{noformat}
Replace 'select' with 'delete', remove the '*' with the hope to delete the rows.  The following error occurs:
{noformat}
jdbc:phoenix:> delete /*+ USE_SORT_MERGE_JOIN */ from mytable where not exists (select primarykey from mytable_staging where mytable.primarykey = mytable_staging.primarykey);
java.lang.IllegalArgumentException
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:141)
at org.apache.phoenix.compile.DeleteCompiler.deleteRows(DeleteCompiler.java:216)
at org.apache.phoenix.compile.DeleteCompiler.access$000(DeleteCompiler.java:98)
at org.apache.phoenix.compile.DeleteCompiler$ClientSelectDeleteMutationPlan.execute(DeleteCompiler.java:937)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
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){noformat}
Using:  *phoenix-4.14.0-1.amzn1.noarch*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)