-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Internal] Query: Adds IsPassThrough option to SqlQuerySpec (#3095)
* Draft PR for Pass Through Query Project * Updated code for Pass Through query on SDK side. * Fixed comments * Added Assert to check if queryPipelineStage is null or not * Added new baseline tests to cover Aggregare, Distinct and No Partition Key provided cases. * Fixed stylistic comments * Fixed comments pt. 2 * Added tests for SqlQueryOptions serialization and deserialization. * Added serialization test when options = false * Updated Linq baseline tests * Updated Linq Baseline Tests pt2 * Updated Linq Baseline Tests pt3 * Updated singleLogicalPartitionKeyQuery boolean * LinqGeneralBaselineTests * Removed error message from linq baseline tests * Added function to check if single partition. Updated test files. Removed SqlQueryOptions. Updated SqlQuerySpec * Added PassThrough check before getting QueryPlan * Added implemenation for ExecuteQueryPlanRequestAsync() * Updated the ExecuteQueryPlanRequestAsync() to include the new parameter * Updated variable names * Added tests for partition key value * Removed unused function * Removed null checker in ToJsonString() in PartitionKey.cs Co-authored-by: j82w <j82w@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
538 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...sts/BaselineTest/TestBaseline/PassThroughQueryBaselineTests.NegativePassThroughOutput.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Results> | ||
<Result> | ||
<Input> | ||
<Description>Null Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>None Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>C# Null Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
</Results> |
41 changes: 41 additions & 0 deletions
41
...sts/BaselineTest/TestBaseline/PassThroughQueryBaselineTests.PositivePassThroughOutput.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Results> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value and Distinct</Description> | ||
<Query>SELECT DISTINCT c.key FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value and Min Aggregate</Description> | ||
<Query>SELECT VALUE MIN(c.key) FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value Fields</Description> | ||
<Query>SELECT c.key FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
</Results> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.