-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Issue 1329 - agtype_to_int4 crash
Fixed issue 1329 where `agtype_to_int`<8,4,2> and `agtype_to_int4_array` crashed due to not properly checking input. As these functions take "any" input, the input has to be properly checked before casting it to a specific type. The input section assumed it was agtype, which caused crashes for non-agtypes. The functions `agtype_to_int`<8,4,2> will convert non-agtypes into agtype. However, there were no regression tests for this. TODOS - The function `agtype_to_int4_array` only takes agtype, currently, and we should consider allowing it to take "any" types. The functions `agtype_to_int`<8,4,2> will convert non-agtypes to agtype ints but, not for their string equivs. Meaning, passing a ('true') or ('3.14') will fail but, passing a (true) or (3.14) will not. Added regression tests. Added missing regression tests.
- Loading branch information
1 parent
34c738f
commit c80b90f
Showing
5 changed files
with
437 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.