Skip to content

Commit

Permalink
fix starrock version
Browse files Browse the repository at this point in the history
fxi
  • Loading branch information
xxhZs committed Feb 22, 2024
1 parent 9784265 commit 12b66e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ci/scripts/e2e-starrocks-sink-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mysql -uroot -P 9030 -h starrocks-fe-server -e "select * from demo.demo_bhv_tabl


if cat ./query_result.csv | sed '1d; s/\t/,/g' | awk -F "," '{
exit !($1 == 1 && $2 == 1 && $3 == 1 && $4 == 1.1 && $5 == 1.2 && $6 == "test" && $7 == "2013-01-01" && $8 == "2013-01-01 01:01:01" && $9 == 0 && $10 = 100); }'; then
exit !($1 == 1 && $2 == 1 && $3 == 1 && $4 == 1.1 && $5 == 1.2 && $6 == "test" && $7 == "2013-01-01" && $8 == "2013-01-01 01:01:01" && $9 == 0 && $10 = {"v101": 100}); }'; then
echo "Starrocks sink check passed"
else
cat ./query_result.csv
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/sink/cassandra_sink.slt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
statement ok
CREATE TABLE t6 (v1 int primary key, v2 smallint, v3 bigint, v4 real, v5 float, v6 varchar, v7 date, v8 timestamp, v9 boolean);
CREATE TABLE t6 (v1 int primary key, v2 smallint, v3 bigint, v4 real, v5 float, v6 varchar, v7 date, v8 timestamptz, v9 boolean);

statement ok
CREATE MATERIALIZED VIEW mv6 AS SELECT * FROM t6;
Expand All @@ -18,7 +18,7 @@ FROM
);

statement ok
INSERT INTO t6 VALUES (1, 1, 1, 1.1, 1.2, 'test', '2013-01-01', '2013-01-01 01:01:01' , false);
INSERT INTO t6 VALUES (1, 1, 1, 1.1, 1.2, 'test', '2013-01-01', '2013-01-01 01:01:01+00:00' , false);

statement ok
FLUSH;
Expand Down
10 changes: 5 additions & 5 deletions src/connector/src/sink/starrocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl StarrocksSink {
Ok(starrocks_data_type.contains("varchar"))
}
risingwave_common::types::DataType::Time => Err(SinkError::Starrocks(
"starrocks can not support Time".to_string(),
"TIME is not supported for Starrocks sink. Please convert to VARCHAR or other supported types.".to_string(),
)),
risingwave_common::types::DataType::Timestamp => {
Ok(starrocks_data_type.contains("datetime"))
Expand All @@ -184,24 +184,24 @@ impl StarrocksSink {
"TIMESTAMP WITH TIMEZONE is not supported for Starrocks sink as Starrocks doesn't store time values with timezone information. Please convert to TIMESTAMP first.".to_string(),
)),
risingwave_common::types::DataType::Interval => Err(SinkError::Starrocks(
"starrocks can not support Interval".to_string(),
"INTERVAL is not supported for Starrocks sink. Please convert to VARCHAR or other supported types.".to_string(),
)),
// todo! Validate the type struct and list
risingwave_common::types::DataType::Struct(_) => Err(SinkError::Starrocks(
"starrocks can not support import struct".to_string(),
"STRUCT is not supported for Starrocks sink.".to_string(),
)),
risingwave_common::types::DataType::List(_) => {
Ok(starrocks_data_type.contains("unknown"))
}
risingwave_common::types::DataType::Bytea => Err(SinkError::Starrocks(
"starrocks can not support Bytea".to_string(),
"BYTEA is not supported for Starrocks sink. Please convert to VARCHAR or other supported types.".to_string(),
)),
risingwave_common::types::DataType::Jsonb => Ok(starrocks_data_type.contains("json")),
risingwave_common::types::DataType::Serial => {
Ok(starrocks_data_type.contains("bigint"))
}
risingwave_common::types::DataType::Int256 => Err(SinkError::Starrocks(
"starrocks can not support Int256".to_string(),
"INT256 is not supported for Starrocks sink.".to_string(),
)),
}
}
Expand Down

0 comments on commit 12b66e5

Please sign in to comment.