-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix varbinary type error (#653)
* fix varbinary type error * add all type test
- Loading branch information
1 parent
b5e0f5e
commit 7b6ca9a
Showing
3 changed files
with
114 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
DROP TABLE IF EXISTS `issue637`; | ||
|
||
affected_rows: 0 | ||
|
||
CREATE TABLE IF NOT EXISTS `issue637` | ||
( | ||
str_tag string TAG, | ||
int_tag int32 TAG, | ||
var_tag VARBINARY TAG, | ||
str_field string, | ||
int_field int32, | ||
bin_field string, | ||
t timestamp NOT NULL, | ||
TIMESTAMP KEY (t) | ||
) ENGINE=Analytic with(enable_ttl = 'false'); | ||
|
||
affected_rows: 0 | ||
|
||
INSERT INTO issue637 | ||
(`str_tag`,`int_tag`,`var_tag`,`str_field`,`int_field`,`bin_field`,`t`) | ||
VALUES | ||
("t1",1,"v1","s1",1,"b1",1651737067000); | ||
|
||
affected_rows: 1 | ||
|
||
SELECT * FROM `issue637`; | ||
|
||
tsid,t,str_tag,int_tag,var_tag,str_field,int_field,bin_field, | ||
UInt64(15527369105987057363),Timestamp(1651737067000),String("t1"),Int32(1),Varbinary([118, 49]),String("s1"),Int32(1),String("b1"), | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS `issue637_1` | ||
( | ||
t timestamp NOT NULL, | ||
double_filed double, | ||
float_filed float, | ||
str_field string, | ||
var_field varbinary, | ||
u64_field uint64, | ||
u32_field uint32, | ||
u16_field uint16, | ||
u8_field uint8, | ||
i64_field int64, | ||
i32_field int32, | ||
i16_field int16, | ||
i8_field int8, | ||
bool_field boolean, | ||
TIMESTAMP KEY (t) | ||
) ENGINE=Analytic with(enable_ttl = 'false'); | ||
|
||
affected_rows: 0 | ||
|
||
INSERT INTO issue637_1 | ||
(`t`,`double_filed`,`float_filed`,`str_field`,`var_field`,`u64_field`,`u32_field`,`u16_field`,`u8_field`,`i64_field`,`i32_field`,`i16_field`,`i8_field`,`bool_field`) | ||
VALUES | ||
(1651737067000,100,100,"s","v",100,100,100,100,100,100,100,100,false); | ||
|
||
affected_rows: 1 | ||
|
||
SELECT * FROM `issue637_1`; | ||
|
||
tsid,t,double_filed,float_filed,str_field,var_field,u64_field,u32_field,u16_field,u8_field,i64_field,i32_field,i16_field,i8_field,bool_field, | ||
UInt64(0),Timestamp(1651737067000),Double(100.0),Float(100.0),String("s"),Varbinary([118]),UInt64(100),UInt32(100),UInt16(100),UInt8(100),Int64(100),Int32(100),Int16(100),Int8(100),Boolean(false), | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
DROP TABLE IF EXISTS `issue637`; | ||
|
||
CREATE TABLE IF NOT EXISTS `issue637` | ||
( | ||
str_tag string TAG, | ||
int_tag int32 TAG, | ||
var_tag VARBINARY TAG, | ||
str_field string, | ||
int_field int32, | ||
bin_field string, | ||
t timestamp NOT NULL, | ||
TIMESTAMP KEY (t) | ||
) ENGINE=Analytic with(enable_ttl = 'false'); | ||
|
||
|
||
INSERT INTO issue637 | ||
(`str_tag`,`int_tag`,`var_tag`,`str_field`,`int_field`,`bin_field`,`t`) | ||
VALUES | ||
("t1",1,"v1","s1",1,"b1",1651737067000); | ||
|
||
SELECT * FROM `issue637`; | ||
|
||
-- Test all data types mentioned in our user document. | ||
CREATE TABLE IF NOT EXISTS `issue637_1` | ||
( | ||
t timestamp NOT NULL, | ||
double_filed double, | ||
float_filed float, | ||
str_field string, | ||
var_field varbinary, | ||
u64_field uint64, | ||
u32_field uint32, | ||
u16_field uint16, | ||
u8_field uint8, | ||
i64_field int64, | ||
i32_field int32, | ||
i16_field int16, | ||
i8_field int8, | ||
bool_field boolean, | ||
TIMESTAMP KEY (t) | ||
) ENGINE=Analytic with(enable_ttl = 'false'); | ||
|
||
INSERT INTO issue637_1 | ||
(`t`,`double_filed`,`float_filed`,`str_field`,`var_field`,`u64_field`,`u32_field`,`u16_field`,`u8_field`,`i64_field`,`i32_field`,`i16_field`,`i8_field`,`bool_field`) | ||
VALUES | ||
(1651737067000,100,100,"s","v",100,100,100,100,100,100,100,100,false); | ||
|
||
SELECT * FROM `issue637_1`; |