Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Test

Result

org.pentaho.mondrian.tck.JoinTest.testThreeWayJoinPlusDoubleStarLeaf89
org.pentaho.mondrian.tck.JoinTest.testThreeWayJoinPlusDoubleStarLeaf92

The driver throws an exception when the following arrangement of table is used. The error happens with both SQL-89 and SQL-92 style joins.

Code Block
D1'<--
      \
D1''<--D1<--      ----->D2
            \    /
             Fact
D3 <-------/



Code Block
Caused by: java.sql.SQLException: [Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Unqualified column reference 'description' is ambiguous), Query: SELECT `warehouse_class`.`description`, `wc2`.`description`, `warehouse`.`warehouse_id`, `inventory_fact_1997`.`store_id`, `time_by_day`.`time_id`, `product`.`product_id` FROM `default`.`warehouse`, `default`.`inventory_fact_1997`, `default`.`product`, `default`.`time_by_day`, `default`.`warehouse_class`, `default`.`warehouse_class` `wc2` WHERE ((`wc2`.`warehouse_class_id` = `warehouse`.`warehouse_class_id`) AND ((`warehouse_class`.`warehouse_class_id` = `warehouse`.`warehouse_class_id`) AND ((`inventory_fact_1997`.`product_id` = `product`.`product_id`) AND ((`inventory_fact_1997`.`warehouse_id` = `warehouse`.`warehouse_id`) AND (`inventory_fact_1997`.`time_id` = `time_by_day`.`time_id`))))) ORDER BY `warehouse`.`warehouse_id` ASC, `inventory_fact_1997`.`store_id` ASC, `time_by_day`.`time_id` ASC, `product`.`product_id` ASC.
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatementInternal(HS2Client.java:832)
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatement(HS2Client.java:287)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.executeQuery(HiveJDBCNativeQueryExecutor.java:487)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCDSIExtQueryExecutor.execute(HiveJDBCDSIExtQueryExecutor.java:165)
	at com.cloudera.impala.jdbc.common.SStatement.executeNoParams(SStatement.java:2695)
	at com.cloudera.impala.jdbc.common.SStatement.execute(SStatement.java:566)
	at org.pentaho.mondrian.tck.SqlExpectation$Builder$1.getData(SqlExpectation.java:269)
	at org.pentaho.mondrian.tck.SqlContext.verify(SqlContext.java:73)
	at org.pentaho.mondrian.tck.JoinTest.testThreeWayJoinPlusDoubleStarLeaf89(JoinTest.java:343)



Code Block
Caused by: java.sql.SQLException: [Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Unqualified column reference 'description' is ambiguous), Query: SELECT `warehouse_class`.`description`, `wc2`.`description`, `warehouse`.`warehouse_id`, `inventory_fact_1997`.`store_id`, `time_by_day`.`time_id`, `product`.`product_id` FROM `default`.`inventory_fact_1997` INNER JOIN `default`.`warehouse` ON (`inventory_fact_1997`.`warehouse_id` = `warehouse`.`warehouse_id`) INNER JOIN `default`.`product` ON (`inventory_fact_1997`.`product_id` = `product`.`product_id`) INNER JOIN `default`.`time_by_day` ON (`inventory_fact_1997`.`time_id` = `time_by_day`.`time_id`) INNER JOIN `default`.`warehouse_class` ON (`warehouse_class`.`warehouse_class_id` = `warehouse`.`warehouse_class_id`) INNER JOIN `default`.`warehouse_class` `wc2` ON (`wc2`.`warehouse_class_id` = `warehouse`.`warehouse_class_id`) ORDER BY `warehouse`.`warehouse_id` ASC, `inventory_fact_1997`.`store_id` ASC, `time_by_day`.`time_id` ASC, `product`.`product_id` ASC.
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatementInternal(HS2Client.java:832)
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatement(HS2Client.java:287)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.executeQuery(HiveJDBCNativeQueryExecutor.java:487)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCDSIExtQueryExecutor.execute(HiveJDBCDSIExtQueryExecutor.java:165)
	at com.cloudera.impala.jdbc.common.SStatement.executeNoParams(SStatement.java:2695)
	at com.cloudera.impala.jdbc.common.SStatement.execute(SStatement.java:566)
	at org.pentaho.mondrian.tck.SqlExpectation$Builder$1.getData(SqlExpectation.java:269)
	at org.pentaho.mondrian.tck.SqlContext.verify(SqlContext.java:73)
	at org.pentaho.mondrian.tck.JoinTest.testThreeWayJoinPlusDoubleStarLeaf92(JoinTest.java:381)

org.pentaho.mondrian.tck.JoinTest.testImplicitJoin

Implicit joins are not supported. If mondrian tries to evaluate a crossjoin of the members of two levels in a context allowing empty cells, the fact table is omitted from the SQL query and both tables are joined by what is called an 'implicit' join.

Code Block
Caused by: java.sql.SQLException: [Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:NotImplementedException: Join with 'default.warehouse_class' requires at least one conjunctive equality predicate. To perform a Cartesian product between two tables, use a CROSS JOIN.), Query: SELECT `warehouse`.`warehouse_id`, `warehouse_class`.`description` FROM `default`.`warehouse`, `default`.`warehouse_class`.
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatementInternal(HS2Client.java:832)
	at com.cloudera.impala.hivecommon.api.HS2Client.executeStatement(HS2Client.java:287)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.executeQuery(HiveJDBCNativeQueryExecutor.java:487)
	at com.cloudera.impala.hivecommon.dataengine.HiveJDBCDSIExtQueryExecutor.execute(HiveJDBCDSIExtQueryExecutor.java:165)
	at com.cloudera.impala.jdbc.common.SStatement.executeNoParams(SStatement.java:2695)
	at com.cloudera.impala.jdbc.common.SStatement.execute(SStatement.java:566)
	at org.pentaho.mondrian.tck.SqlExpectation$Builder$1.getData(SqlExpectation.java:269)
	at org.pentaho.mondrian.tck.SqlContext.verify(SqlContext.java:73)
	at org.pentaho.mondrian.tck.JoinTest.testImplicitJoin(JoinTest.java:120)

Warnings

Distinct Count

Symptom

Not all forms of distinct count queries are supported. One form of distinct count for multiple columns is supported however, so mondrian can batch the queries as needed. The integration tests have also shown that the dialect is issuing the distinct count queries correctly.

...