[ 
https://issues.apache.org/jira/browse/PHOENIX-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885975#comment-16885975
 ] 

chenglei commented on PHOENIX-5290:
-----------------------------------

@James Taylor
bq. The problem is that 0 is not a valid value for a byte in a string
For now we can not prevent 0 in the where query condition, just like following 
test,  which would failed when compile the query.May be we would process 
specially for 0 of variable field.
{code:java}
 @Test
    public void testBug2961() throws Exception {
        Connection conn = null;
        try {
            conn = DriverManager.getConnection(getUrl());
            conn.createStatement().execute("CREATE TABLE test2961 (\n" + 
                    "ACCOUNT_ID VARCHAR NOT NULL,\n" + 
                    "BUCKET_ID VARCHAR NOT NULL,\n" + 
                    "OBJECT_ID VARCHAR NOT NULL,\n" + 
                    "OBJECT_VERSION VARCHAR NOT NULL,\n" + 
                    "LOC VARCHAR,\n" + 
                    "CONSTRAINT PK PRIMARY KEY (ACCOUNT_ID, BUCKET_ID, 
OBJECT_ID, OBJECT_VERSION DESC))");
           
          String sql = "SELECT  OBJ.ACCOUNT_ID from  test2961 as OBJ where " +
                    "(OBJ.ACCOUNT_ID, OBJ.BUCKET_ID, OBJ.OBJECT_ID, 
OBJ.OBJECT_VERSION) IN "+
                    "((?,?,?,?),(?,?,?,?))";
           
            PhoenixPreparedStatement statement = 
conn.prepareStatement(sql).unwrap(PhoenixPreparedStatement.class);
            statement.setString(1, new String(new char[]{(char)3}));
            statement.setString(2, new String(new char[]{(char)55}));
            statement.setString(3, new String(new char[]{(char)39}));
            statement.setString(4, new String(new char[]{(char)0}));
            statement.setString(5, new String(new char[]{(char)83}));
            statement.setString(6, new String(new char[]{(char)15}));
            statement.setString(7, new String(new char[]{(char)55}));
            statement.setString(8, new String(new char[]{(char)147}));
            statement.optimizeQuery(sql);
        } finally {
            conn.close();
        }
    }
{code}



> HashJoinMoreIT is flapping
> --------------------------
>
>                 Key: PHOENIX-5290
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5290
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0, 4.14.1, 5.1.0
>            Reporter: Lars Hofhansl
>            Priority: Major
>             Fix For: 4.15.0, 5.1.0
>
>         Attachments: 5290-failure.txt, 5290-v2.txt, 5290-v3.txt, 5290.txt
>
>
> {code}
> [INFO] Running org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 91.509 s <<< FAILURE! - in org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] testBug2961(org.apache.phoenix.end2end.join.HashJoinMoreIT)  Time 
> elapsed: 2.42 s  <<< ERROR!
> java.lang.IllegalArgumentException: 6 > 5
>         at 
> org.apache.phoenix.end2end.join.HashJoinMoreIT.testBug2961(HashJoinMoreIT.java:898)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to