cql3: Fix cql_statement and parsed_statement confusion

Cassandra's ParsedStatement does not implement CqlStatement. Classes
such as UseStatement extend ParsedStatement and implement CqlStatement
which causes JVM to dispatch methods such as usesFunction to
ParsedStatement.

This doesn't happen in C++, of course, which leaves classes such as
use_statement abstract and thus uninstantiable.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
Pekka Enberg
2015-01-13 10:49:32 +02:00
parent 8330fa0b78
commit 485620abcf

View File

@@ -39,7 +39,7 @@ namespace cql3 {
namespace statements {
class parsed_statement {
class parsed_statement : public virtual cql_statement {
private:
::shared_ptr<variable_specifications> _variables;
@@ -78,7 +78,7 @@ public:
virtual std::unique_ptr<prepared> prepare() = 0;
virtual bool uses_function(sstring ks_name, sstring function_name) {
virtual bool uses_function(sstring ks_name, sstring function_name) override {
return false;
}
};