Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
1. The return type of EXTRACT_DATE is BIGINT (i.e. long) after parsing.
```
public SqlExtractFunction()
```
2. The return type of SqlFunctions.unixDateExtract is Integer.
```
public net.hydromatic.linq4j.Enumerable bind(final net.hydromatic.optiq.DataContext root0) {
final net.hydromatic.linq4j.AbstractEnumerable child = new net.hydromatic.linq4j.AbstractEnumerable(){
public net.hydromatic.linq4j.Enumerator enumerator() {
return new net.hydromatic.linq4j.Enumerator(){
... ...
public Object current()
};
}
};
```
3. BIGINT will be treat as Long that is conflict with Integer.
```
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at net.hydromatic.optiq.runtime.AbstractCursor$LongAccessor.getLong(AbstractCursor.java:469)
at net.hydromatic.optiq.runtime.AbstractCursor$ExactNumericAccessor.getBigDecimal(AbstractCursor.java:365)
at net.hydromatic.avatica.AvaticaResultSet.getBigDecimal(AvaticaResultSet.java:352)
at org.dbunit.dataset.datatype.BigIntegerDataType.getSqlValue(BigIntegerDataType.java:100)
at org.dbunit.database.ForwardOnlyResultSetTable.getValue(ForwardOnlyResultSetTable.java:104)
at org.dbunit.dataset.DefaultTable.addTableRows(DefaultTable.java:139)
at org.dbunit.database.CachedResultSetTable.<init>(CachedResultSetTable.java:69)
at org.dbunit.database.CachedResultSetTableFactory.createTable(CachedResultSetTableFactory.java:52)
```
---------------- Imported from GitHub ----------------
Url: https://github.com/julianhyde/optiq/issues/281
Created by: jiangxuchina
Labels:
Created at: Tue May 13 09:35:13 CEST 2014
State: closed