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

doris-sink: panic when insert decimal array data #16176

Open
xuefengze opened this issue Apr 7, 2024 · 4 comments
Open

doris-sink: panic when insert decimal array data #16176

xuefengze opened this issue Apr 7, 2024 · 4 comments
Assignees
Labels
no-issue-activity type/bug Something isn't working
Milestone

Comments

@xuefengze
Copy link
Contributor

thread 'rw-streaming' panicked at src/connector/src/sink/encoder/json.rs:252:51:
called `Option::unwrap()` on a `None` value

in doris:

CREATE table doris_types(
    types_id int,
    c_decimal ARRAY<decimal>,
) UNIQUE KEY(`types_id`)
DISTRIBUTED BY HASH(`types_id`) BUCKETS 1
PROPERTIES (
    "replication_allocation" = "tag.location.default: 1"
);

it seems that the c_decimal's type is ARRAY, so the get_decimal_pre_scale func return None.

pub fn get_decimal_pre_scale(&self) -> Option<(u8, u8)> {
if self.r#type.contains("DECIMAL") {
let a = self.precision.clone().unwrap().parse::<u8>().unwrap();
let b = self.scale.clone().unwrap().parse::<u8>().unwrap();
Some((a, b))
} else {
None
}
}
}

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

cc. @xxhZs

Copy link
Contributor

github-actions bot commented Jun 8, 2024

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.

@hzxa21
Copy link
Collaborator

hzxa21 commented Oct 8, 2024

@xxhZs Is the issue fixed?

@xxhZs
Copy link
Contributor

xxhZs commented Oct 11, 2024

The reason is that the array of the schema for the http port of doris doesn't have information about the internal type, we can use the mysql port to get the schema, but there will be compatibility issues, so it may still need to be fixed by them, an issue has been raised for them
apache/doris#41693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants