kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3594) Select with Catalog fails
Date Sat, 29 Sep 2018 07:55:00 GMT

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

ASF GitHub Bot commented on KYLIN-3594:
---------------------------------------

coveralls commented on issue #268: KYLIN-3594 Obey JDBC standard
URL: https://github.com/apache/kylin/pull/268#issuecomment-425625274
 
 
   ## Pull Request Test Coverage Report for [Build 3714](https://coveralls.io/builds/19260478)
   
   * **4** of **7**   **(57.14%)**  changed or added relevant lines in **2** files are covered.
   * **3** unchanged lines in **2** files lost coverage.
   * Overall coverage decreased (**-0.002%**) to **23.17%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [query/src/main/java/org/apache/kylin/query/util/QueryUtil.java](https://coveralls.io/builds/19260478/source?filename=query%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fquery%2Futil%2FQueryUtil.java#L103)
| 4 | 5 | 80.0%
   | [server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java](https://coveralls.io/builds/19260478/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fservice%2FQueryService.java#L561)
| 0 | 2 | 0.0%
   <!-- | **Total:** | **4** | **7** | **57.14%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/19260478/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L553)
| 1 | 78.12% |
   | [core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://coveralls.io/builds/19260478/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Fcuboid%2FTreeCuboidScheduler.java#L124)
| 2 | 68.46% |
   <!-- | **Total:** | **3** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/19260478/badge)](https://coveralls.io/builds/19260478)
|
   | :-- | --: |
   | Change from base [Build 3711](https://coveralls.io/builds/19259592): |  -0.002% |
   | Covered Lines: | 16161 |
   | Relevant Lines: | 69750 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Select with Catalog fails
> -------------------------
>
>                 Key: KYLIN-3594
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3594
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Hosur Narahari
>            Assignee: XiaoXiang Yu
>            Priority: Major
>
> By using DatabaseMetaData if we get catalog using getCatalogs() method, it return value
"defaultCatalog". It returns actual hive schema when we execute getSchemas().
> According to JDBC contract, catalog.schema.table should be valid from clause and many
query layers use that. But kylin fails when we execute that query.
> I've tried to write sample code piece for that below.
>  
>         _DatabaseMetaData db = conn.getMetaData();_
>         _ResultSet catalogSet = db.getCatalogs();_
>         _String catalog = "";_
>         _if(catalogSet.next()) {_
>             _catalog = catalogSet.getString("TABLE_CAT");_
>         _}_
>         _ResultSet schemaSet = db.getSchemas();_
>         _String schema = "";_
>         _if(schemaSet.next()) {_
>             _schema = schemaSet.getString("TABLE_SCHEM");_
>         _}_
>         _StringBuilder sb = new StringBuilder("SELECT * FROM ");_
>         _if(!catalog.isEmpty()) {_
>             _sb.append(catalog + ".");_
>         _}_
>         _if(!schema.isEmpty()) {_
>             _sb.append(schema + ".");_
>         _}_
>         _sb.append("kylin_sales limit 10");_
>         _String query = sb.toString();_
>         _Statement stat = conn.createStatement();_
>         _ResultSet rs = stat.executeQuery(query);_
>         _while(rs.next()) {_
>             _System.out.println(rs.getObject("trans_id"));_
>         _}_
> In short, the above snippet is executing the query,
> _select * from defaultCatalog.DEFAULT.kylin_sales._
>  
> Same thing happens even with different schemas if we have like,
> _select * from defaultCatalog.test.kylin_sales_ also fails.



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

Mime
View raw message