-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix](StreamingJob) fix create table issues when create streaming job #59828
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 31878 ms |
TPC-DS: Total hot run time: 175143 ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes three issues when creating tables for streaming jobs:
- VARCHAR column lengths are now multiplied by 3 to accommodate multi-byte character encodings
- Columns are reordered to place primary key columns first, in the order specified
- Unsupported column types now trigger an error with a clear message
Changes:
- Enhanced
getColumnsmethod to multiply varchar lengths by 3, validate against unsupported types, and sort columns by primary key order - Added comprehensive unit tests covering varchar conversion, primary key sorting, and edge cases
- Updated regression test to verify varchar length multiplication (200 * 3 = 600)
- Added logging and toString support for commit offset operations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| fe/fe-core/src/main/java/org/apache/doris/job/util/StreamingJobUtils.java | Core logic changes: varchar length multiplication by 3, unsupported type validation, and primary key-based column sorting |
| fe/fe-core/src/test/java/org/apache/doris/job/util/StreamingJobUtilsTest.java | New comprehensive unit tests for getColumns method covering varchar conversion, primary key sorting, and edge cases |
| regression-test/suites/job_p0/streaming_job/cdc/test_streaming_mysql_job.groovy | Updated assertion to verify varchar(200) becomes varchar(600), added table3 cleanup |
| fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/StreamingJobAction.java | Added logging for offset commits and @tostring annotation for better debugging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fe/fe-core/src/test/java/org/apache/doris/job/util/StreamingJobUtilsTest.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/StreamingJobAction.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/job/util/StreamingJobUtils.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/job/util/StreamingJobUtils.java
Show resolved
Hide resolved
fe/fe-core/src/test/java/org/apache/doris/job/util/StreamingJobUtilsTest.java
Show resolved
Hide resolved
fe/fe-core/src/test/java/org/apache/doris/job/util/StreamingJobUtilsTest.java
Show resolved
Hide resolved
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 31030 ms |
TPC-DS: Total hot run time: 173039 ms |
|
run buildall |
TPC-H: Total hot run time: 31423 ms |
TPC-DS: Total hot run time: 172158 ms |
|
run cloud_p0 |
sollhui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
What problem does this PR solve?
Related PR: #58898
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)