mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-27 21:54:15 +00:00
comment out or change SDK code to remove errors
This commit is contained in:
committed by
Chris Anderson
parent
2afb2d82e4
commit
f4aa74ad6f
@@ -1,10 +1,7 @@
|
|||||||
import { Constants } from "../common";
|
import { Constants } from "../common";
|
||||||
import { RUCapPerOperationExceededErrorCode } from "../request/RUCapPerOperationExceededError";
|
import { RUCapPerOperationExceededErrorCode } from "../request/RUCapPerOperationExceededError";
|
||||||
import { GroupByEndpointComponent } from "./EndpointComponent/GroupByEndpointComponent";
|
|
||||||
import { GroupByValueEndpointComponent } from "./EndpointComponent/GroupByValueEndpointComponent";
|
|
||||||
import { NonStreamingOrderByDistinctEndpointComponent } from "./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent";
|
import { NonStreamingOrderByDistinctEndpointComponent } from "./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent";
|
||||||
import { NonStreamingOrderByEndpointComponent } from "./EndpointComponent/NonStreamingOrderByEndpointComponent";
|
import { NonStreamingOrderByEndpointComponent } from "./EndpointComponent/NonStreamingOrderByEndpointComponent";
|
||||||
import { OffsetLimitEndpointComponent } from "./EndpointComponent/OffsetLimitEndpointComponent";
|
|
||||||
import { OrderByEndpointComponent } from "./EndpointComponent/OrderByEndpointComponent";
|
import { OrderByEndpointComponent } from "./EndpointComponent/OrderByEndpointComponent";
|
||||||
import { OrderedDistinctEndpointComponent } from "./EndpointComponent/OrderedDistinctEndpointComponent";
|
import { OrderedDistinctEndpointComponent } from "./EndpointComponent/OrderedDistinctEndpointComponent";
|
||||||
import { UnorderedDistinctEndpointComponent } from "./EndpointComponent/UnorderedDistinctEndpointComponent";
|
import { UnorderedDistinctEndpointComponent } from "./EndpointComponent/UnorderedDistinctEndpointComponent";
|
||||||
@@ -27,13 +24,16 @@ export class PipelinedQueryExecutionContext {
|
|||||||
this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE;
|
this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
// Pick between Nonstreaming and streaming endpoints
|
// Pick between Nonstreaming and streaming endpoints
|
||||||
this.nonStreamingOrderBy = partitionedQueryExecutionInfo.queryInfo.hasNonStreamingOrderBy;
|
// this.nonStreamingOrderBy = partitionedQueryExecutionInfo.queryInfo.hasNonStreamingOrderBy;
|
||||||
|
this.nonStreamingOrderBy = false;
|
||||||
// Pick between parallel vs order by execution context
|
// Pick between parallel vs order by execution context
|
||||||
const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;
|
// const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;
|
||||||
|
const sortOrders = [];
|
||||||
// TODO: Currently we don't get any field from backend to determine streaming queries
|
// TODO: Currently we don't get any field from backend to determine streaming queries
|
||||||
if (this.nonStreamingOrderBy) {
|
if (this.nonStreamingOrderBy) {
|
||||||
this.vectorSearchBufferSize = this.calculateVectorSearchBufferSize(partitionedQueryExecutionInfo.queryInfo, options);
|
this.vectorSearchBufferSize = this.calculateVectorSearchBufferSize(partitionedQueryExecutionInfo.queryInfo, options);
|
||||||
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
//const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
||||||
|
const distinctType = "None";
|
||||||
const context = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo);
|
const context = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo);
|
||||||
if (distinctType === "None") {
|
if (distinctType === "None") {
|
||||||
this.endpoint = new NonStreamingOrderByEndpointComponent(context, sortOrders, this.vectorSearchBufferSize, partitionedQueryExecutionInfo.queryInfo.offset);
|
this.endpoint = new NonStreamingOrderByEndpointComponent(context, sortOrders, this.vectorSearchBufferSize, partitionedQueryExecutionInfo.queryInfo.offset);
|
||||||
@@ -51,7 +51,7 @@ export class PipelinedQueryExecutionContext {
|
|||||||
else {
|
else {
|
||||||
this.endpoint = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo);
|
this.endpoint = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo);
|
||||||
}
|
}
|
||||||
if (Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length >
|
/*if (Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length >
|
||||||
0 ||
|
0 ||
|
||||||
partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 ||
|
partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 ||
|
||||||
partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0) {
|
partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0) {
|
||||||
@@ -61,20 +61,21 @@ export class PipelinedQueryExecutionContext {
|
|||||||
else {
|
else {
|
||||||
this.endpoint = new GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
this.endpoint = new GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
// If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N
|
// If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N
|
||||||
const top = partitionedQueryExecutionInfo.queryInfo.top;
|
/*const top = partitionedQueryExecutionInfo.queryInfo.top;
|
||||||
if (typeof top === "number") {
|
if (typeof top === "number") {
|
||||||
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);
|
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);
|
||||||
}
|
}*/
|
||||||
// If offset+limit then add that to the pipeline
|
// If offset+limit then add that to the pipeline
|
||||||
const limit = partitionedQueryExecutionInfo.queryInfo.limit;
|
/*const limit = partitionedQueryExecutionInfo.queryInfo.limit;
|
||||||
const offset = partitionedQueryExecutionInfo.queryInfo.offset;
|
const offset = partitionedQueryExecutionInfo.queryInfo.offset;
|
||||||
if (typeof limit === "number" && typeof offset === "number") {
|
if (typeof limit === "number" && typeof offset === "number") {
|
||||||
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);
|
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);
|
||||||
}
|
}*/
|
||||||
// If distinct then add that to the pipeline
|
// If distinct then add that to the pipeline
|
||||||
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
// const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
||||||
|
const distinctType = "None";
|
||||||
if (distinctType === "Ordered") {
|
if (distinctType === "Ordered") {
|
||||||
this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);
|
this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ export class SmartRoutingMapProvider {
|
|||||||
*/
|
*/
|
||||||
async getOverlappingRanges(collectionLink, sortedRanges, diagnosticNode) {
|
async getOverlappingRanges(collectionLink, sortedRanges, diagnosticNode) {
|
||||||
// validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges
|
// validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges
|
||||||
if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) {
|
/*if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) {
|
||||||
throw new Error("the list of ranges is not a non-overlapping sorted ranges");
|
throw new Error("the list of ranges is not a non-overlapping sorted ranges");
|
||||||
}
|
}*/
|
||||||
|
sortedRanges = [];
|
||||||
let partitionKeyRanges = []; // TODO: any ParitionKeyRanges
|
let partitionKeyRanges = []; // TODO: any ParitionKeyRanges
|
||||||
if (sortedRanges.length === 0) {
|
if (sortedRanges.length === 0) {
|
||||||
return partitionKeyRanges;
|
return partitionKeyRanges;
|
||||||
|
|||||||
Reference in New Issue
Block a user