From 77552d340778422a1c0a1b9ebfeca308937b3f45 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sat, 11 Apr 2015 00:54:10 +0300 Subject: [PATCH 1/2] db: fix float_type's implementation Was double, should be float. --- types.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.cc b/types.cc index 6835572761..5a99f704dc 100644 --- a/types.cc +++ b/types.cc @@ -1483,6 +1483,6 @@ thread_local const shared_ptr timeuuid_type(make_shared timestamp_type(make_shared()); thread_local const shared_ptr uuid_type(make_shared()); thread_local const shared_ptr inet_addr_type(make_shared()); -thread_local const shared_ptr float_type(make_shared()); +thread_local const shared_ptr float_type(make_shared()); thread_local const shared_ptr double_type(make_shared()); thread_local const data_type empty_type(make_shared()); From 339bf297534d0a3c6d9d70f29f5dc5274507d03f Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sat, 11 Apr 2015 00:54:44 +0300 Subject: [PATCH 2/2] cql3: enable float and double types in grammar --- cql3/Cql.g | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cql3/Cql.g b/cql3/Cql.g index 46a91ca543..cfc80d9810 100644 --- a/cql3/Cql.g +++ b/cql3/Cql.g @@ -1310,8 +1310,10 @@ native_type returns [shared_ptr t] #if 0 | K_COUNTER { $t = CQL3Type.Native.COUNTER; } | K_DECIMAL { $t = CQL3Type.Native.DECIMAL; } - | K_DOUBLE { $t = CQL3Type.Native.DOUBLE; } - | K_FLOAT { $t = CQL3Type.Native.FLOAT; } +#endif + | K_DOUBLE { $t = cql3_type::double_; } + | K_FLOAT { $t = cql3_type::float_; } +#if 0 | K_INET { $t = CQL3Type.Native.INET;} #endif | K_INT { $t = cql3_type::int_; }