- Newest
- Most votes
- Most comments
Greetings,
There seems to be a limit when it comes to saving integers, it is 19 numbers or less in QLDB. I tried to replicate the scenario using the below INSERT syntax.
INSERT INTO DriversLicense
<< {
'LicensePlateNumber' : 'LEWISR261LL',
'LicenseType' : 'Learner',
'ValidFromDate' : `2016-12-20T`,
'ValidToDate' : `2020-11-15T`,
'PersonId' : 146141183460469231731687303715884105727
} >>
the above returns:
Evaluator Error: at line 7, column 18: Int overflow or underflow, <UNKNOWN> : <UNKNOWN>; Int overflow or underflow
If I save the below, the data is persisted.
INSERT INTO DriversLicense
<< {
'LicensePlateNumber' : 'LEWISR261LL',
'LicenseType' : 'Learner',
'ValidFromDate' : `2016-12-20T`,
'ValidToDate' : `2020-11-15T`,
'PersonId' : -9223372036854775808
} >>
Similarly if I save the following, the data is persisted with no issue as well.
INSERT INTO DriversLicense
<< {
'LicensePlateNumber' : 'LEWISR261LL',
'LicenseType' : 'Learner',
'ValidFromDate' : `2016-12-20T`,
'ValidToDate' : `2020-11-15T`,
'PersonId' : 9223372036854775807
} >>
If you can afford to save number as a string in QLDB and handle the conversion within your application syntax (client side) than you can use that as the workaround. If you try to do the same INSERT operation where 'PersonId' : '146141183460469231731687303715884105727' the operation is a success. There is a limit of 20 numbers for integer columns in QLDB. I hope this is helpful. If you feel that I have mistaken what you are asking, please reach out to QLDB Support from your AWS Management console with your relevent ledger (also tables) details and business use case.
Relevant content
- asked a year ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 7 months ago
Thanks for the response and illustration. You say 'There is a limit of 20 numbers for integer columns in QLDB' but I cannot see that documented anywhere and the link to the documentation I provided says 'Signed integers of arbitrary size'. Is this a case of the documentation being wrong and requiring amendment ?
(I have logged a support case but after 2 weeks it remained unassigned/unanswered hence creating this question...I need a support plan refund)