mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 18:50:53 +00:00
cql3: expr: Add column_maybe_subscripted
column_maybe_subscripted is a variant that can be either a column_value or a subscript. It will be used as an argument to functions which used to take column_value. Right now column_value has a sub field, but this will be removed soon once the subscript struct takes over. Changing the argument type is a smaller change than rewriting all these functions, although if they were rewritten the resulting code would probably be nicer. Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>
This commit is contained in:
@@ -143,6 +143,9 @@ managed_bytes_opt get_value(const column_value& col, const column_value_eval_bag
|
||||
}
|
||||
}
|
||||
|
||||
/// column that might be subscripted - e.g col1, col2, col3[sub1]
|
||||
using column_maybe_subscripted = std::variant<const column_value*, const subscript*>;
|
||||
|
||||
/// Type for comparing results of get_value().
|
||||
const abstract_type* get_value_comparator(const column_definition* cdef) {
|
||||
return &cdef->type->without_reversed();
|
||||
|
||||
Reference in New Issue
Block a user