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: Fixes c# query parser to handle Alias in from clause #2611

Merged
merged 5 commits into from
Sep 10, 2021

Conversation

leminh98
Copy link
Contributor

Pull Request Template

Description

This fixes the managed parser bug where it would throw error while parsing a valid aliased FROM clause without the AS keyword

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

closes #2568

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|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. 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.

@leminh98 leminh98 changed the title Query: Fix Alias bug in from clause Query: Fixes Alias bug in from clause Jul 13, 2021
@github-actions github-actions bot dismissed their stale review July 13, 2021 16:47

All good!

@sboshra
Copy link
Contributor

sboshra commented Jul 13, 2021

select_item : scalar_expression (K_AS IDENTIFIER)? ;

please make this optional


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

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:

@j82w j82w changed the title Query: Fixes Alias bug in from clause Query: Fixes c# query parser to handle Alias in from clause Jul 13, 2021
@j82w j82w merged commit 2b2988e into master Sep 10, 2021
@j82w j82w deleted the users/leminh/fromclausefix branch September 10, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query: Issue while parsing Query with alias.
3 participants