Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starrocks-sink: insert decimal type data got error #16121

Closed
xuefengze opened this issue Apr 3, 2024 · 1 comment
Closed

starrocks-sink: insert decimal type data got error #16121

xuefengze opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@xuefengze
Copy link
Contributor

xuefengze commented Apr 3, 2024

Describe the bug

when column_type is decimal64(10, 0)

if column_type.contains("decimal") {
let decimal_all = column_type
.split("decimal(")
.last()
.ok_or_else(|| SinkError::Starrocks("must have last".to_string()))?
.split(')')
.next()
.ok_or_else(|| SinkError::Starrocks("must have next".to_string()))?
.split(',')
.collect_vec();
let length = decimal_all
.first()
.ok_or_else(|| SinkError::Starrocks("must have next".to_string()))?
.parse::<u8>()
.map_err(|e| {
SinkError::Starrocks(format!("starrocks sink error: {}", e.as_report()))
})?;
let scale = decimal_all
.last()
.ok_or_else(|| SinkError::Starrocks("must have next".to_string()))?
.parse::<u8>()
.map_err(|e| {
SinkError::Starrocks(format!("starrocks sink error: {}", e.as_report()))
})?;
decimal_map.insert(name.to_string(), (length, scale));

Error message/log

ERROR risingwave_stream::task::stream_manager: actor exit with error actor_id=11 error=Executor error: Sink error: Starrocks error: starrocks sink error: invalid digit found in string

To Reproduce

starrocks v3.1.7:

CREATE table starrocks_types(
    types_id int,
    c_decimal decimal
) ENGINE=OLAP
UNIQUE KEY(`types_id`)
DISTRIBUTED BY HASH(`types_id`) BUCKETS 1
PROPERTIES (
    "replication_num" = "1"
);

rw:

CREATE TABLE starrocks_types (
  types_id INT,
  c_decimal decimal,
  PRIMARY KEY (types_id)
);

INSERT INTO starrocks_types VALUES (1, 0);

CREATE SINK starrocks_types_sink
FROM
    starrocks_types WITH (
    connector = 'starrocks',
    type = 'append-only',
    starrocks.host = 'localhost',
    starrocks.mysqlport = '9030',
    starrocks.httpport = '8030',
    starrocks.user = 'users',
    starrocks.password = '123456',
    starrocks.database = 'demo',
    starrocks.table = 'starrocks_types',
    force_append_only='true'
);

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@xuefengze xuefengze added the type/bug Something isn't working label Apr 3, 2024
@github-actions github-actions bot added this to the release-1.8 milestone Apr 3, 2024
@xxhZs
Copy link
Contributor

xxhZs commented Apr 3, 2024

Could be a known issue #15664

@xxhZs xxhZs closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants