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 OFFSET, LIMIT, TOP data types to match those coming from query plan #4939

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adityasa
Copy link
Contributor

Query : Fixes OFFSET, LIMIT, TOP data types to match those coming from query plan

This change ensures that the data types of OFFSET, LIMIT and TOP fields on QueryInfo and HybridSearchQueryInfo objects match those coming from the query plan. Currently the queryplan/service uses ULONG which has a range of 0x00000000 to 0xFFFFFFFF. Since QueryInfo fields use int?, this causes an overflow for a value that's larger than 0x7FFFFFFF for any of these fields.

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

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29123.88
# Visual Studio Version 17
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revert.

{
throw new ArgumentException($"{nameof(limit)} must be a non negative number.");
throw new ArgumentNullException(nameof(limit));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ArgumentNullException

ArgumentOutOfRangeException

throw new ArgumentOutOfRangeException(nameof(takeCount));
}

this.takeCount = (int)takeCount;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

takeCount

Maybe store this as uint and remove cast in pipelinestages.

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.

1 participant