You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by mm...@apache.org on 2017/06/21 04:19:50 UTC
calcite git commit: [CALCITE-1855] Fix float values in Cassandra
adapter
Repository: calcite
Updated Branches:
refs/heads/master d5c713c5c -> 43e32fa5a
[CALCITE-1855] Fix float values in Cassandra adapter
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/43e32fa5
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/43e32fa5
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/43e32fa5
Branch: refs/heads/master
Commit: 43e32fa5a4d5828370dbdf9cffe3bb295ffc475a
Parents: d5c713c
Author: Michael Mior <mm...@uwaterloo.ca>
Authored: Wed Jun 21 00:19:22 2017 -0400
Committer: Michael Mior <mm...@uwaterloo.ca>
Committed: Wed Jun 21 00:19:22 2017 -0400
----------------------------------------------------------------------
.../apache/calcite/adapter/cassandra/CassandraEnumerator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/43e32fa5/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
----------------------------------------------------------------------
diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
index 0c06800..a7436fd 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
@@ -83,8 +83,10 @@ class CassandraEnumerator implements Enumerator<Object> {
return current.getInt(index);
} else if (type == DataType.bigint()) {
return current.getLong(index);
- } else if (type == DataType.cdouble() || type == DataType.cfloat()) {
+ } else if (type == DataType.cdouble()) {
return current.getDouble(index);
+ } else if (type == DataType.cfloat()) {
+ return current.getFloat(index);
} else if (type == DataType.uuid() || type == DataType.timeuuid()) {
return current.getUUID(index).toString();
} else {