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

[hotfix-#1771] [connector][starrocks] The sr table was not partitioned, causing data consumption to fail but the flink task presentation to succeed #1774

Closed
wants to merge 1 commit into from

Conversation

david-gao1
Copy link
Contributor

Purpose of this pull request

修复因为starrocks没有创建分区,导致任务失败但flink任务实际展示为成功,且有写成功条数等信息

Which issue you fix

Fixes #1771 (issue).

…titioned, causing data consumption to fail but the flink task presentation to succeed
if (!streamLoadManager.tableHasPartition()) {
throw new RuntimeException(
"data cannot be inserted into table with empty partition. "
+ "Use `SHOW PARTITIONS FROM star_test` to see the currently partitions of this table");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does star_test mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

。。。 My mistake。Should be the output table name

try {
jdbcConnProvider.checkValid();
final String query = "SHOW PARTITIONS FROM " + database + "." + table + ";";
PreparedStatement stmt = jdbcConnProvider.getConnection().prepareStatement(query);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to close those resource

@david-gao1 david-gao1 closed this Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants