Hi Valeriy, I remember that "jdbcCatalog" and "jdbcSchema" should be carefully configured for Hive Jdbc. Maybe you can try "null" or db name.
best, DonnyZone Valeriy Trofimov <[email protected]> 于2019年6月19日周三 上午8:11写道: > Hi All, > > I'm trying to connect to Hive DB via Thrift JDBC Server. > > I get error: "Object 'test' not found within 'thrift'". > > The error occurs by the IdentifierNamespace.resolveImpl() method. The > method checks that schema looks correct based on my query. > > Schema: > > { > version: '1.0', > schemas: [ > { > name: 'thrift', > type: 'custom', > factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory', > operand: { > jdbcDriver: 'org.apache.hive.jdbc.HiveDriver', > jdbcUrl: 'jdbc:hive2://127.0.0.1:10000/default', // please use > VirtualBox port forwarding to the VM with Thrift server running > jdbcUser: '', > jdbcPassword: '' > } > } > ] > } > > Test query: > > String query = "select * from \"thrift\".\"test\""; > > I've double checked that you can connect to Thrift Server and that there is > a database called "default" and table called "test". > > It looks like the error is caused by Calcite trying to find entries for > "tables" in the schema. But I am confused why it would look for it. JDBC > schema doesnt require these entries and adding them actually shows error > about "tables" not needing to be there. > > Repro steps for this issue are too long, but I can provide if someone is > interested in digging deeper into this. > > Thanks, > Val >
