361 changes: 345 additions & 16 deletions test/cql-pytest/test_secondary_index.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/tuple.hh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public:
return ret;
}
template <typename Range> // range of managed_bytes_opt or managed_bytes_view_opt
requires requires (Range it) { {it.begin()->value()} -> std::convertible_to<managed_bytes_view>; }
requires requires (Range it) { {std::begin(it)->value()} -> std::convertible_to<managed_bytes_view>; }
static managed_bytes build_value_fragmented(Range&& range) {
size_t size = 0;
for (auto&& v : range) {
Expand Down
4 changes: 4 additions & 0 deletions view_info.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class view_info final {
mutable shared_ptr<cql3::statements::select_statement> _select_statement;
mutable std::optional<query::partition_slice> _partition_slice;
db::view::base_info_ptr _base_info;
mutable bool _has_computed_column_depending_on_base_non_primary_key;
public:
view_info(const schema& schema, const raw_view_info& raw_view_info);

Expand Down Expand Up @@ -52,6 +53,9 @@ public:
const column_definition* view_column(const schema& base, column_id base_id) const;
const column_definition* view_column(const column_definition& base_def) const;
bool has_base_non_pk_columns_in_view_pk() const;
bool has_computed_column_depending_on_base_non_primary_key() const {
return _has_computed_column_depending_on_base_non_primary_key;
}

/// Returns a pointer to the base_dependent_view_info which matches the current
/// schema of the base table.
Expand Down