Skip to content

Commit

Permalink
cql3: selection: drop selector_factories, selectables, and selectors
Browse files Browse the repository at this point in the history
The whole class hierarchy is no longer used by anything and we can just
delete it.
  • Loading branch information
avikivity committed Jul 3, 2023
1 parent d9cf81f commit 66c47d4
Show file tree
Hide file tree
Showing 28 changed files with 6 additions and 1,453 deletions.
3 changes: 0 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,7 @@ def find_headers(repodir, excluded_dirs):
'cql3/query_options.cc',
'cql3/user_types.cc',
'cql3/untyped_result_set.cc',
'cql3/selection/abstract_function_selector.cc',
'cql3/selection/simple_selector.cc',
'cql3/selection/selectable.cc',
'cql3/selection/selector_factories.cc',
'cql3/selection/selection.cc',
'cql3/selection/selector.cc',
'cql3/restrictions/statement_restrictions.cc',
Expand Down
3 changes: 0 additions & 3 deletions cql3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ target_sources(cql3
query_options.cc
user_types.cc
untyped_result_set.cc
selection/abstract_function_selector.cc
selection/simple_selector.cc
selection/selectable.cc
selection/selector_factories.cc
selection/selection.cc
selection/selector.cc
restrictions/statement_restrictions.cc
Expand Down
3 changes: 1 addition & 2 deletions cql3/Cql.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ options {
}

@parser::includes {
#include "cql3/selection/writetime_or_ttl.hh"
#include "cql3/statements/raw/parsed_statement.hh"
#include "cql3/statements/raw/select_statement.hh"
#include "cql3/statements/alter_keyspace_statement.hh"
Expand Down Expand Up @@ -67,8 +66,8 @@ options {
#include "cql3/statements/index_target.hh"
#include "cql3/statements/ks_prop_defs.hh"
#include "cql3/selection/raw_selector.hh"
#include "cql3/selection/selectable-expr.hh"
#include "cql3/keyspace_element_name.hh"
#include "cql3/selection/selectable_with_field_selection.hh"
#include "cql3/constants.hh"
#include "cql3/operation_impl.hh"
#include "cql3/error_listener.hh"
Expand Down
14 changes: 0 additions & 14 deletions cql3/functions/castas_fcts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,19 +380,5 @@ get_castas_fctn_as_cql3_function(data_type to_type, data_type from_type) {
return make_castas_function(to_type, from_type, f);
}

shared_ptr<function> castas_functions::get(data_type to_type, const std::vector<shared_ptr<cql3::selection::selector>>& provided_args) {
if (provided_args.size() != 1) {
throw exceptions::invalid_request_exception("Invalid CAST expression");
}
auto from_type = provided_args[0]->get_type();
auto from_type_key = from_type;
if (from_type_key->is_reversed()) {
from_type_key = dynamic_cast<const reversed_type_impl&>(*from_type).underlying_type();
}

auto f = get_castas_fctn(to_type, from_type_key);
return make_castas_function(to_type, from_type, f);
}

}
}
6 changes: 0 additions & 6 deletions cql3/functions/castas_fcts.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "exceptions/exceptions.hh"
#include <seastar/core/print.hh>
#include "cql3/cql3_type.hh"
#include "cql3/selection/selector.hh"

namespace cql3 {
namespace functions {
Expand All @@ -32,10 +31,5 @@ using castas_fctn = data_value(*)(data_value);
castas_fctn get_castas_fctn(data_type to_type, data_type from_type);
::shared_ptr<function> get_castas_fctn_as_cql3_function(data_type to_type, data_type from_type);

class castas_functions {
public:
static shared_ptr<function> get(data_type to_type, const std::vector<shared_ptr<cql3::selection::selector>>& provided_args);
};

}
}
124 changes: 0 additions & 124 deletions cql3/selection/abstract_function_selector.cc

This file was deleted.

93 changes: 0 additions & 93 deletions cql3/selection/abstract_function_selector.hh

This file was deleted.

61 changes: 0 additions & 61 deletions cql3/selection/aggregate_function_selector.hh

This file was deleted.

0 comments on commit 66c47d4

Please sign in to comment.