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

Query: Adds support for LIKE statement and INT system functions to c# query parser to avoid gateway query plan call when service interop is not available. #2353

Merged
merged 17 commits into from
Apr 21, 2021

Conversation

leminh98
Copy link
Contributor

@leminh98 leminh98 commented Mar 30, 2021

Pull Request Template

Description

This PR adds LIKE support and INT system functions for SqlObject and the ANTLR parser. It updates the grammar file, the CSTtoASTvisitor and all the associated Sql DOM.
This PR also adds fixes for an outstanding grammar bug, #2201

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #2201

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors) Description"

Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@j82w j82w changed the title [Query][Internal]LIKE support in SqlObject and ANTLR parser Query: Adds support for LIKE statement to c# query parser to avoid gateway query plan call when service interop is not available. Mar 30, 2021
@github-actions github-actions bot dismissed their stale review March 30, 2021 21:01

All good!

bchong95
bchong95 previously approved these changes Mar 31, 2021
Copy link
Contributor

@bchong95 bchong95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@sboshra
Copy link
Contributor

sboshra commented Apr 21, 2021

| binary_scalar_expression K_OR binary_scalar_expression

please remove these rules


Refers to: Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4:118 in c3a4d03. [](commit_id = c3a4d03, deletion_comment = False)

@leminh98 leminh98 changed the title Query: Adds support for LIKE statement to c# query parser to avoid gateway query plan call when service interop is not available. Query: Adds support for LIKE statement and INT system functions to c# query parser to avoid gateway query plan call when service interop is not available. Apr 21, 2021
sboshra
sboshra previously approved these changes Apr 21, 2021
Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@leminh98
Copy link
Contributor Author

| binary_scalar_expression K_OR binary_scalar_expression

please remove these rules

Refers to: Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4:118 in c3a4d03. [](commit_id = c3a4d03, deletion_comment = False)

will update this in a separate PR, as discussed, it is out of scope of this PR

@sboshra sboshra merged commit e4074b5 into master Apr 21, 2021
@sboshra sboshra deleted the users/leminh/LIKESupportInSqlObject branch April 21, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Querying for fields with non-trailing numbers in the property names throws exception
4 participants