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

Bug in JetCommand.cs affects TOP and maybe SKIP #52

Open
aim12340 opened this issue Jun 3, 2020 · 0 comments
Open

Bug in JetCommand.cs affects TOP and maybe SKIP #52

aim12340 opened this issue Jun 3, 2020 · 0 comments
Labels

Comments

@aim12340
Copy link

aim12340 commented Jun 3, 2020

Hi,

When using table.skip(skipX).take(takeX) I run into empty datasets when skipX > 999.

I tracked it to JetCommand.cs line 288:
string stringTopCount = _WrappedCommand.CommandText.Substring(indexOfTop + 4, indexOfTopEnd - indexOfTop).Trim();

The SubString is off by one. Up to 3 digits it is fine but 4 digits gets truncated to 3, so 1100 becomes 110. My fix is:

string stringTopCount = _WrappedCommand.CommandText.Substring(indexOfTop + 5, indexOfTopEnd - indexOfTop).Trim();

becasue " top " is 5 chars long.

I was surprised to not get the same error with SKIP but I see you handle that SubString differently. On line 300 you have

string stringSkipCount = _WrappedCommand.CommandText.Substring(indexOfSkip + 5).Trim();

which I think should be a 6 for the same reason:

string stringSkipCount = _WrappedCommand.CommandText.Substring(indexOfSkip + 6).Trim();

Just to be consistent. It doesn't show the same problem but maybe some edge case will trip it up.

Hope that helps. In a selfish note, any chance of getting this in an RC2? I can't use the source, have to rely on the Nuget package.

@bubibubi bubibubi added the bug label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants