You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Caleb Rackliffe (Jira)" <ji...@apache.org> on 2024/04/09 19:30:00 UTC
[jira] [Commented] (CASSANDRA-19544) Vector search should be able to restrict on clustering keys when filtering isn't required
[ https://issues.apache.org/jira/browse/CASSANDRA-19544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835516#comment-17835516 ]
Caleb Rackliffe commented on CASSANDRA-19544:
---------------------------------------------
Not related to the patch directly, but I think we need to apply this patch to fix {{SelectStatement.TOPK_PAGE_SIZE_WARNING}}, which is used in {{VectorInvalidQueryTest}}.
{noformat}
Subject: [PATCH] Fix TOPK_PAGE_SIZE_WARNING format string
---
Index: src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java (revision 2415d6ec752d8a7e93555e73b32ebbfced20fa02)
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java (date 1712690734321)
@@ -120,7 +120,7 @@
"/ LOCAL_ONE / NODE_LOCAL. Consistency level %s was requested. " +
"Downgrading the consistency level to %s.";
public static final String TOPK_PAGE_SIZE_WARNING = "Top-K queries do not support paging and the page size is set to %d, " +
- "which is less than LIMIT %d. The page size has been set to %<d to match the LIMIT.";
+ "which is less than LIMIT %d. The page size has been set to %d to match the LIMIT.";
public final VariableSpecifications bindVariables;
public final TableMetadata table;
@@ -325,7 +325,7 @@
pageSize = limit.count();
limit = getDataLimits(userLimit, userPerPartitionLimit, pageSize, aggregationSpec);
options = QueryOptions.withPageSize(options, pageSize);
- ClientWarn.instance.warn(String.format(TOPK_PAGE_SIZE_WARNING, oldPageSize, limit.count()));
+ ClientWarn.instance.warn(String.format(TOPK_PAGE_SIZE_WARNING, oldPageSize, limit.count(), pageSize));
}
}
{noformat}
> Vector search should be able to restrict on clustering keys when filtering isn't required
> -----------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19544
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19544
> Project: Cassandra
> Issue Type: Bug
> Components: Feature/Vector Search
> Reporter: Michael Semb Wever
> Assignee: Michael Semb Wever
> Priority: Normal
> Fix For: 5.0.x, 5.x
>
> Attachments: CASSANDRA-19544_50_ci_summary.html, CASSANDRA-19544_50_results_details.tar.xz, CASSANDRA-19544_trunk_ci_summary.html, CASSANDRA-19544_trunk_results_details.tar.xz
>
>
> With a table that has {{primary key((a,b),c,d)}}
> a restriction on only the partition works,
> e.g. {{where a=. and b=. order by . ann of .}}
> but a restriction that also includes a forward sequence of clustering keys (i.e. a clustering key restriction that wouldn't require filtering) does not currently work.
> e.g. {{where a=. and b=. and c=. order by . ann of .}}
> It appears that StatementRestriction:321 is a little too greedy.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org