You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Larry McCay (JIRA)" <ji...@apache.org> on 2014/11/20 05:00:33 UTC

[jira] [Created] (CALCITE-470) CSV Example README Tutorial Doesn't Work

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)