matrixone
                                
                                
                                
                                    matrixone copied to clipboard
                            
                            
                            
                        [Bug]: `BIGINT UNSIGNED` type, insert can success, but select abnormal.It is unreasonable.
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
 
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93):
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
CREATE TABLE numbers(pk INTEGER PRIMARY KEY,ui BIGINT UNSIGNED,si BIGINT);
INSERT INTO numbers VALUES (0, 0, -9223372036854775808), (1, 18446744073709551615, 9223372036854775807);
SELECT * FROM numbers WHERE ui=0; error: "Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow"
Expected Behavior
SELECT * FROM numbers WHERE ui=0;
mysql> SELECT * FROM numbers WHERE ui=0; +----+------+----------------------+ | pk | ui | si | +----+------+----------------------+ | 0 | 0 | -9223372036854775808 | +----+------+----------------------+
Steps to Reproduce
No response
Additional information
No response
mysql> SELECT * FROM numbers WHERE ui=0; ERROR 1105 (HY000): Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow mysql> update numbers set si=8 WHERE ui=0; ERROR 1105 (HY000): Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow mysql> delete from numbers WHERE ui=0; ERROR 1105 (HY000): Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow
Conversion rules are already defined. uint64, int64 will cast as int64, int64. You can use: SELECT * FROM numbers WHERE ui=cast(0 as unsigned);
                                    
                                    
                                    
                                
int64 cannot be converted implicitly to uint64 in parser. Can we adjust our plan to fix this issue? @fengttt @aunjgr
not working on this
https://github.com/matrixorigin/matrixone/pull/6888 already fixed in this pr
                                    
                                    
                                    
                                
Hello @tianyahui-python. The bug issue in the BVT test code has not been removed,issues automatically open.
bvt tag no remove. @badboynt1
                                    
                                    
                                    
                                
relation issue: https://github.com/matrixorigin/matrixone/issues/7278