Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #48325

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Feb 26, 2025
@hello-stephen
Copy link
Contributor

run buildall

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 401ce13 into branch-3.0 Feb 26, 2025
21 of 24 checks passed
@github-actions github-actions bot deleted the auto-pick-48325-branch-3.0 branch February 26, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants