Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
While kicking the tires I encountered the following failure:
0: jdbc:calcite:model=target/test-classes/mod> !connect jdbc:calcite:model=target/test-classes/smart.json admin admin 1: jdbc:calcite:model=target/test-classes/sma> EXPLAIN PLAN FOR SELECT * FROM emps; +------+ | PLAN | +------+ | CsvTableScan(table=[[SALES, EMPS]], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) | +------+ 1 row selected (0.342 seconds) 1: jdbc:calcite:model=target/test-classes/sma> SELECT depts.name, count(*) . . . . . . . . . . . . . . . . . . . . . . .> FROM emps JOIN depts USING (deptno) . . . . . . . . . . . . . . . . . . . . . . .> GROUP BY depts.name; Nov 19, 2014 10:45:14 PM org.apache.calcite.sql.validate.SqlValidatorException <init> SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Column 'DEPTNO' matched using NATURAL keyword or USING clause has incompatible types: cannot compare 'JavaType(class java.lang.String)' to 'JavaType(class java.lang.Integer)' Nov 19, 2014 10:45:14 PM org.apache.calcite.runtime.CalciteException <init> SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 2, column 29 to line 2, column 34: Column 'DEPTNO' matched using NATURAL keyword or USING clause has incompatible types: cannot compare 'JavaType(class java.lang.String)' to 'JavaType(class java.lang.Integer)' Error: while executing SQL: SELECT depts.name, count(*) FROM emps JOIN depts USING (deptno) GROUP BY depts.name (state=,code=0)
Given a pointer to what needs to be addressed, I can try and provide a patch for this.