Skip to content
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

[Internal] Query: Adds deserializing logic for ClientQL Coordinator Distribution Plan #3988

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
cee7af7
First commit.
akotalwar Jul 17, 2023
3e5450c
Added remaining classes for ClientQL structure
akotalwar Jul 31, 2023
57edea7
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Jul 31, 2023
a934da3
Added ClientQLDeserializing class and added CoordinatorDistributionPl…
akotalwar Jul 31, 2023
10a39ac
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Jul 31, 2023
4fd31d4
Added support for all Enumerable and Scalar Expressions
akotalwar Aug 16, 2023
9d6f403
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Aug 16, 2023
1ad1d82
Added baseline tests for testing CoordinatorDistributionPlan deserial…
akotalwar Aug 18, 2023
9a45109
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Aug 18, 2023
15c5ee9
Made ClientQL objects immutable
akotalwar Aug 21, 2023
c5d2109
Added error and null checks for Value calls
akotalwar Aug 21, 2023
d48da1a
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Aug 21, 2023
4efdc24
Updated List<> with IReadOnlyList<>
akotalwar Aug 21, 2023
36573db
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Aug 21, 2023
5e5cdc0
Made most functions in the Deserializing class private and static
akotalwar Aug 21, 2023
894f8ea
Added static constant class for Enumerable expressions
akotalwar Aug 21, 2023
1966161
Added null checking for arrays
akotalwar Aug 22, 2023
65dd839
Removed null checks from deserializing array functions
akotalwar Aug 22, 2023
545611d
Removed support for JavaScript
akotalwar Aug 23, 2023
66e5bb3
Removed support for Unwind
akotalwar Aug 23, 2023
deee173
Function names changed
akotalwar Aug 23, 2023
a19ba5b
Removed few functions.
akotalwar Aug 23, 2023
91de1dc
Updated constants class
akotalwar Aug 26, 2023
3799da8
Function Formatting for ClientQL Deserializing (#4062)
akotalwar Sep 7, 2023
9cdc93c
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 7, 2023
98b5c67
Resolved comments pt3
akotalwar Sep 8, 2023
2b9d0ce
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Sep 8, 2023
5d2d306
Changed parameter types from int to long
akotalwar Sep 8, 2023
581b88f
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 8, 2023
5e3c819
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 11, 2023
020c39b
Removed ClientQLDelegate
akotalwar Sep 12, 2023
6197277
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Sep 12, 2023
563b98e
Syntax Fixes
akotalwar Sep 12, 2023
d4f9791
Removed ClientQLFlattenEnumerable file. This is JS.
akotalwar Sep 12, 2023
65943e6
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 12, 2023
ab5f029
Fixed List helper functions
akotalwar Sep 13, 2023
68faa7c
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Sep 13, 2023
0925d97
Made singleton constructors from public to private
akotalwar Sep 14, 2023
3afb5c2
Updated the DeserializeClientQLBinaryLiteral function
akotalwar Sep 18, 2023
029fbb8
Renamed ClientQL to QL
akotalwar Sep 18, 2023
5c29c54
Fixed variable names
akotalwar Sep 18, 2023
9f93c92
Updated more variable names
akotalwar Sep 18, 2023
efa258f
Removed support for Type
akotalwar Sep 19, 2023
3d2bf7d
Removed all extra newlines
akotalwar Sep 19, 2023
4244f8f
Added null checks
akotalwar Sep 20, 2023
79870ca
Updated the name CoordinatorDistributionPlan to ClientDistributionPlan
akotalwar Sep 21, 2023
394dbf0
Removed all support for Cassandra, Mongo and Binary Literal
akotalwar Sep 21, 2023
be3d8c2
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 22, 2023
f082ef6
Updaed ClientQL to Cql
akotalwar Sep 25, 2023
e697a6d
Merge branch 'users/akotalwar/DeserializationForClientQL' of https://…
akotalwar Sep 25, 2023
dd6035c
Updated baseline test class property.
akotalwar Sep 26, 2023
1d6da08
Merge branch 'master' into users/akotalwar/DeserializationForClientQL
akotalwar Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLAggregate
{
public ClientQLAggregateKind Kind { get; set; }
akotalwar marked this conversation as resolved.
Show resolved Hide resolved

public string OperatorKind { get; set; }
akotalwar marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
using System;

internal class ClientQLAggregateEnumerableExpression : ClientQLEnumerableExpression
{
public ClientQLEnumerableExpression SourceExpression { get; set; }

public ClientQLAggregate Aggregate { get; set; }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal enum ClientQLAggregateKind
{
Builtin,
Tuple,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal enum ClientQLAggregateOperatorKind
{
All,
Any,
Array,
CMax,
CMin,
Count,
CSum,
First,
Last,
Max,
Min,
Sum,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLAggregateSignature
{
public ClientQLTypeKind ItemType { get; set; }

public ClientQLTypeKind ResultType { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
using System.Collections.Generic;

internal class ClientQLArrayCreateScalarExpression : ClientQLScalarExpression
{
public ClientQLArrayKind ArrayKind { get; set; }

public List<ClientQLScalarExpression> VecItems { get; set; }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLArrayIndexerScalarExpression : ClientQLScalarExpression
{
public ClientQLScalarExpression Expression { get; set; }

public int Index { get; set; }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal enum ClientQLArrayKind
{
Array,
CList,
CMap,
CSet,
CTuple,
MArray
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
using System.Collections.Generic;

internal class ClientQLArrayLiteral : ClientQLLiteral
{
public List<ClientQLLiteral> VecItems { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLBaseType : ClientQLType
{
public bool ExcludesUndefined { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal enum ClientQLBaseTypeKind
{
Array,
Binary,
Boolean,
CGuid,
CNumber,
MDateTime,
MJavaScript,
MNumber,
MObjectId,
MRegex,
MSingleton,
MSymbol,
MTimestamp,
Number,
Object,
String,
Variant,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLBinaryLiteral : ClientQLLiteral
{
// Dont know what should go inside
//const LinearAllocBuffer m_value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLBinaryScalarExpression : ClientQLScalarExpression
{
public ClientQLBinaryScalarOperatorKind OperatorKind { get; set; }

public int MaxDepth { get; set; }

public ClientQLScalarExpression LeftExpression { get; set; }

public ClientQLScalarExpression RightExpression { get; set; }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal enum ClientQLBinaryScalarOperatorKind
{
Add,
And,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
Divide,
Equal,
GreaterThan,
GreaterThanOrEqual,
LeftShift,
LessThan,
LessThanOrEqual,
Modulo,
Multiply,
NotEqual,
Or,
RightShift,
Subtract,
ZeroFillRightShift
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLBooleanLiteral : ClientQLLiteral
{
public bool Value { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Query.Core.CoordinatorDistributionPlan.ClientQL
{
internal class ClientQLBuiltinAggregate : ClientQLAggregate
{
public new ClientQLAggregateOperatorKind OperatorKind { get; set; }
}
}
Loading
Loading