-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cosmos][VectorSearch] Non Streaming Order By Query #39897
Changes from 35 commits
540a16d
6f49c75
97509eb
528a0eb
86b36d3
a979c11
e2756a5
8be2277
e491b9d
151bb50
73afd5b
148cba5
3b0d751
87572f7
df7e838
179f904
5602e33
36ab9b7
70639b5
c45c3a5
6c255ee
9d427e6
1cadb1b
0f1be0c
d4dcad2
cdaa5bc
dfa8b64
7549cbe
c6e2376
30d8370
8279358
dd9d13b
d966af4
9eb9208
1aaecef
8bf4f8d
943cc4c
1db9b31
2770b0f
7002362
508e94a
822bd67
46fe7cb
5657b75
015a77c
f87be45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
aayush3011 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// Licensed under the MIT License. | ||
package com.azure.cosmos.implementation.query; | ||
|
||
import com.azure.cosmos.CosmosException; | ||
|
||
public class NonStreamingOrderByBadRequestException extends CosmosException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* Creates a new instance of the NonStreamingOrderByBadRequestException class. | ||
* | ||
* @param statusCode the http status code of the response. | ||
* @param errorMessage the error message. | ||
*/ | ||
public NonStreamingOrderByBadRequestException(int statusCode, String errorMessage) { | ||
super(statusCode, errorMessage); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos.implementation.query; | ||
|
||
import com.azure.cosmos.implementation.Document; | ||
import com.azure.cosmos.implementation.DocumentClientRetryPolicy; | ||
import com.azure.cosmos.implementation.RxDocumentServiceRequest; | ||
import com.azure.cosmos.implementation.feedranges.FeedRangeEpkImpl; | ||
import com.azure.cosmos.implementation.query.orderbyquery.OrderbyRowComparer; | ||
import com.azure.cosmos.models.CosmosQueryRequestOptions; | ||
import com.azure.cosmos.models.FeedResponse; | ||
import reactor.core.publisher.Mono; | ||
|
||
import java.util.UUID; | ||
import java.util.function.Function; | ||
import java.util.function.Supplier; | ||
|
||
public class NonStreamingOrderByDocumentProducer extends DocumentProducer<Document> { | ||
private final OrderbyRowComparer<Document> consumeComparer; | ||
|
||
NonStreamingOrderByDocumentProducer( | ||
OrderbyRowComparer<Document> consumeComparer, | ||
IDocumentQueryClient client, | ||
String collectionResourceId, | ||
CosmosQueryRequestOptions cosmosQueryRequestOptions, | ||
TriFunction<FeedRangeEpkImpl, String, Integer, RxDocumentServiceRequest> createRequestFunc, | ||
Function<RxDocumentServiceRequest, Mono<FeedResponse<Document>>> executeRequestFunc, | ||
FeedRangeEpkImpl feedRange, | ||
String collectionLink, | ||
Supplier<DocumentClientRetryPolicy> createRetryPolicyFunc, | ||
Class<Document> resourceType, | ||
UUID correlatedActivityId, | ||
int initialPageSize, | ||
String initialContinuationToken, | ||
int top, | ||
Supplier<String> operationContextTextProvider) { | ||
super(client, collectionResourceId, cosmosQueryRequestOptions, createRequestFunc, executeRequestFunc, | ||
collectionLink, createRetryPolicyFunc, resourceType, correlatedActivityId, initialPageSize, | ||
initialContinuationToken, top, feedRange, operationContextTextProvider); | ||
this.consumeComparer = consumeComparer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split handling? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But during @aayush3011 can we add a split tests to verify? thanks |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed yesterday in the vector search scrum with Hari, and for now we would go as the default value as False, meaning if the users are want to use the older queries they would have to set this env variable as True.