Closed zairnamlas closed 9 years ago
Do you get any exceptions? or just not get any results back when you run the query?
On Fri, Aug 28, 2015 at 1:00 PM, zairnamlas notifications@github.com wrote:
Hi there again, I have just noticed that the long numbers are not working in sql. Consider the following two examples
// Not working even the data is present SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065416056 WITH(Index(UserIdIndex, false), NoConsistentRead)
// Working SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065 WITH(Index(UserIdIndex, false), NoConsistentRead)
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/DynamoDb.SQL/issues/28.
I think what's happening is that, the integer value gets converted to int32 which overflows in this case so by the time it's converted to a request to DynamoDB it's sending through a negative number instead.
On Fri, Aug 28, 2015 at 1:23 PM, Yan Cui theburningmonk@gmail.com wrote:
Do you get any exceptions? or just not get any results back when you run the query?
On Fri, Aug 28, 2015 at 1:00 PM, zairnamlas notifications@github.com wrote:
Hi there again, I have just noticed that the long numbers are not working in sql. Consider the following two examples
// Not working even the data is present SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065416056 WITH(Index(UserIdIndex, false), NoConsistentRead)
// Working SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065 WITH(Index(UserIdIndex, false), NoConsistentRead)
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/DynamoDb.SQL/issues/28.
Yeah, looks like that is the case. No exception and no results coming back. Is it a quick fix?
Yup, should be straight forward, will fix it tonight
On Fri, Aug 28, 2015 at 3:38 PM, zairnamlas notifications@github.com wrote:
Yeah, looks like that is the case. No exception and no results coming back. Is it a quick fix?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/DynamoDb.SQL/issues/28#issuecomment-135792129 .
Thanks, let me know the changes as I'm using inline project of yours with latest AWS SDK. I can apply those changes in my version of the code.
@zairnamlas took a little longer than I had before a bank holiday weekend trip but turns out the parser was fine, it was a problem when the float was translated to a DynamoDB request because the default behaviour of ToString
is to use scientific notation on large floating point numbers.
In the end it was a very simple fix though, which was to use the r
formatting string https://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
I've published a hotfix version 2.1.1
with this fix
Thanks Yan. I'm on holidays and I'll check that next week. Could you please share the changed loc? On 1 Sep 2015 6:18 pm, "Yan Cui" notifications@github.com wrote:
@zairnamlas https://github.com/zairnamlas took a little longer than I had before a bank holiday weekend trip but turns out the parser was fine, it was a problem when the float was translated to a DynamoDB request because the default behaviour of ToString is to use scientific notation on large floating point numbers.
In the end it was a very simple fix though, which was to use the r formatting string https://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/DynamoDb.SQL/issues/28#issuecomment-136801172 .
Hi there again, I have just noticed that the long numbers are not working in sql. Consider the following two examples
// Not working even the data is present SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065416056 WITH(Index(UserIdIndex, false), NoConsistentRead)
// Working SELECT * FROM pd_cs_chatroomuser WHERE UserId = 10205471065 WITH(Index(UserIdIndex, false), NoConsistentRead)