github-actions[bot] commented on code in PR #69761:
URL: https://github.com/apache/doris/pull/69761#discussion_r4478543524
##########
be/src/storage/compaction/compaction.cpp:
##########
@@ -1663,7 +1678,8 @@ void
Compaction::construct_index_compaction_columns(RowsetWriterContext& ctx) {
}
const int32_t col_unique_id = col_unique_ids[0];
if (!_cur_tablet_schema->has_column_unique_id(col_unique_id) ||
-
!field_is_slice_type(_cur_tablet_schema->column_by_uid(col_unique_id).type())) {
+
(!field_is_slice_type(_cur_tablet_schema->column_by_uid(col_unique_id).type())
&&
+ !destination_index->is_variant_values_index())) {
Review Comment:
[P1] Rebuild values indexes when compaction changes leaf text
This admits a values index to native merge without checking the final path
types. With native compaction enabled, separate inserts of `{"n":true}` (id 1)
and `{"n":1}` (id 2), followed by full compaction, can store `{"n":1}` for both
rows while retaining source postings `true -> [1]` and `1 -> [2]`. Indexed `v
MATCH_ANY '1'` then loses row 1, and indexed `v MATCH_ANY 'true'` returns a row
that scalar evaluation rejects; the new `promotion_contract.out` explicitly
records these results. Require canonical leaf-text preservation before native
merge, or rebuild the affected root, and make the regression require index/scan
parity. This differs from existing discussion 4400052218's empty-array
layout/ancestor-visibility case: one stable path and boolean-to-number
promotion suffice.
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -3471,6 +3481,10 @@ private boolean processDropIndex(DropIndexOp
dropIndexOp, OlapTable olapTable, L
throw new DdlException("index " + indexName + " does not exist");
}
+ if (found.isVariantValuesIndex()) {
+ throw new DdlException("DROP INDEX is not supported for a VARIANT
values index");
Review Comment:
[P2] Reject values-index drops before processing earlier clauses
On a table with `bloom_filter_columns=aux` and `values_idx(v)`, `ALTER TABLE
t DROP COLUMN aux, DROP INDEX values_idx` first reaches `processDropColumn()`,
which calls `olapTable.setBloomFilterInfo()` on live metadata, then throws
here. `process()` only unlocks on failure: `aux` remains in the schema, but its
Bloom Filter configuration is silently removed without an EditLog record.
Prevalidate this restriction before processing any clauses, or stage that
metadata until the whole statement succeeds. Extend the atomicity regression
with this combination; its current no-Bloom-Filter case misses the mutation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]