I have the same issue , resolved by switch all my sql config from 
prepareStatement to normal statement , all sql params are directly concat into 
sql string.

________________________________
赵天烁
Kevin Zhao
[email protected]<mailto:[email protected]>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China
meizu.com

From: youcheng.zhang (JIRA)<mailto:[email protected]>
Date: 2017-08-25 21:25
To: [email protected]<mailto:[email protected]>
Subject: [jira] [Created] (KYLIN-2815) No results with prepareStatement but OK 
with KylinStatement

youcheng.zhang created KYLIN-2815:
-------------------------------------

             Summary: No results with prepareStatement but OK with 
KylinStatement
                 Key: KYLIN-2815
                 URL: https://issues.apache.org/jira/browse/KYLIN-2815
             Project: Kylin
          Issue Type: Bug
          Components: Driver - JDBC
    Affects Versions: v2.1.0
            Reporter: youcheng.zhang


Actually, my prepareStatement queries works well with kylin version v2.0.
After I upgrade kylin to version v2.1, all queries have no results return,

Then I write test:

{code:java}
Driver driver = (Driver) 
Class.forName("org.apache.kylin.jdbc.Driver").newInstance();
Properties info = new Properties();
info.put("user", "ADMIN");
info.put("password", "KYLIN");
Connection conn = driver.connect("jdbc:kylin://IP:7070/project_name", info);
PreparedStatement pst = conn.prepareStatement("select XX where XX = ? ")
pst.setInt(1, 1);
ResultSet resultSet = pst.executeQuery();
{code}

Return no results, and after that I change the query to statement

{code:java}
Statement state = conn.createStatement();
ResultSet resultSet = state.executeQuery("select XX where XX = 1")
{code}

Finally, I got return values.
I have no idea whether it is a bug or I have done something wrong with upgrade?
As I have removed HBase tables “kylin_metadata_user” and “kylin_metadata_acl", 
I think
I can't come back to version v2.0 any more:(









--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to