title: How to delete from apache phoenix querying by fields not in every index
body: <p>I try to execute statement</p>
  
  <pre><code>DELETE FROM statistics WHERE statistic_id is null
  </code></pre>
  
  <p>and geting error:</p>
  
  <pre><code>java.sql.SQLException: ERROR 1027 (42Y86): All columns referenced in a WHERE clause must be available in every index for a table with immutable rows. tableName=STATISTICS
  at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:386)
  at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
  at org.apache.phoenix.compile.DeleteCompiler.compile(DeleteCompiler.java:389)
  at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDeleteStatement.compilePlan(PhoenixStatement.java:553)
  at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDeleteStatement.compilePlan(PhoenixStatement.java:541)
  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:303)
  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:296)
  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
  at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:294)
  at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1254)
  at sqlline.Commands.execute(Commands.java:822)
  at sqlline.Commands.sql(Commands.java:732)
  at sqlline.SqlLine.dispatch(SqlLine.java:808)
  at sqlline.SqlLine.begin(SqlLine.java:681)
  at sqlline.SqlLine.start(SqlLine.java:398)
  at sqlline.SqlLine.main(SqlLine.java:292)
  </code></pre>
  
  <p>my primary key is on field ID and I've secondary key on STATISTIC_ID</p>