Larry McCay created CALCITE-470:
-----------------------------------
Summary: CSV Example README Tutorial Doesn't Work
Key: CALCITE-470
URL: https://issues.apache.org/jira/browse/CALCITE-470
Project: Calcite
Issue Type: Bug
Reporter: Larry McCay
Assignee: Julian Hyde
While kicking the tires I encountered the following failure:
{code}
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)
{code}
Given a pointer to what needs to be addressed, I can try and provide a patch
for this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)