Hi ,
     Currently, while working on the Phoenix Pig support on
v3.0.0.incubating branch , I notice that we need to pass the default column
family with double quotes in the SELECT query.
   A test case for it is


    @Test
    public void testSelectQueryWithDefaultCF() throws SQLException {
        final Properties props = new Properties();
        final Connection conn = DriverManager.getConnection(getUrl(),
props);
        conn.createStatement().execute("CREATE TABLE HIRES (id integer not
null, name varchar, cf1.location varchar constraint pk primary key(id))");

        final String query = "select id,0.name from HIRES";
        final Statement statement = conn.createStatement();
        statement.executeQuery(query);

     }

      The above test fails with the following error.
    org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00):
Syntax error. Encountered "." at line 1, column 12.
    at
org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
    at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
    at
org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:775)
    at
org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:856)
    at
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:891)

   However , the following queries work.
      String query = "select id,\"0\".name from HIRES";
      String query = "select id,name from HIRES";

Is the exception an expected behaviour with default column family or a bug?

Any help appreciated.

Regards
Ravi

Reply via email to