You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morningman (via GitHub)" <gi...@apache.org> on 2026/10/14 19:36:07 UTC
[PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
morningman opened a new pull request, #69086:
URL: https://github.com/apache/doris/pull/69086
### What problem does this PR solve?
Issue Number: None
Related PR: #66428
Problem Summary:
**In short.** This ports #66428 from branch-4.1 (it is also in branch-4.2): `ALTER TABLE ... SET ("key" = "value", ...)` sets the native properties of an Iceberg or Paimon table. On master the statement fails analysis for any key other than `auto_analyze_policy`. This PR adds a connector SPI method for it, implements it for Iceberg and Paimon, and commits all the keys of one statement together or none of them.
**Background.** On master every external catalog is plugin driven. An `ALTER TABLE` on an external table reaches `PluginDrivenExternalCatalog`, which resolves the connector's table handle and calls the matching `ConnectorMetadata` method (column evolution, branches and tags, partition evolution). The only `SET (...)` an external table accepted was `auto_analyze_policy`, which Doris stores itself. In branch-4.x, #66428 added `updateTableProperties` to the Iceberg and Paimon metadata ops in fe-core. master has no such ops in fe-core, and the SPI had no method for table properties.
**The problem, and what it cost.**
| Statement on an Iceberg or Paimon table | master | with this PR |
|---|---|---|
| `SET ('write.target-file-size-bytes' = '134217728')` | `Unknown table property: [write.target-file-size-bytes]` | set on the table |
| `SET ('snapshot.num-retained.min' = '3', 'snapshot.num-retained.max' = '6')` | `Can only set one table property(without dynamic partition && binlog) at a time` | both set, as one Paimon schema change |
| `SET ('auto_analyze_policy' = 'disable')` | stored by Doris | unchanged |
| `SET ('auto_analyze_policy' = 'enable', 'write.target-file-size-bytes' = '536870912')` | `Can only set one table property ...` | `auto_analyze_policy cannot be set with external table properties` |
Properties such as snapshot retention, target file size or manifest merging could only be changed from another engine, such as Spark or Flink.
**How this PR fixes it.**
- SPI: `ConnectorTableDdlOps#setTableProperties(session, handle, properties)`. The default throws `SET TABLE PROPERTIES not supported`. A connector that implements it must commit every entry of the map or none of them. The recorded method surface is updated.
- fe-core, as in branch-4.1: `ModifyTablePropertiesOp` accepts any number of keys for a table outside the internal catalog and rejects `auto_analyze_policy` mixed with other keys. `Alter` keeps `auto_analyze_policy` on the Doris path and sends the other keys to `CatalogIf#updateTableProperties`. `PluginDrivenExternalCatalog` calls the connector, and writes the refresh edit log and refreshes the cached table only after the connector returns.
- Iceberg: one `UpdateProperties` commit inside the catalog's auth context. Iceberg validates the whole map before it commits, so a map with a format-version downgrade does not commit its valid keys either.
- Paimon: one `Catalog.alterTable` with a `SchemaChange.setOption` per key. Paimon validates the whole list before it commits, and one statement adds one schema version.
- HMS: as it does for the other ALTER operations, the HMS gateway forwards the call to its Iceberg sibling for an Iceberg table, so the statement behaves the same through an HMS catalog. A Hive table still reports it as unsupported. Branch-4.x does not support it through an HMS catalog.
**Results.**
- Unit tests:
- `ModifyTablePropertiesOpTest`, from branch-4.1: validation for external and internal tables, and of `auto_analyze_policy`.
- `PluginDrivenExternalCatalogDdlRoutingTest`: the whole map reaches the connector in one call, and the refresh edit log and cache refresh follow. A connector failure is reported, and neither of them happens.
- `CatalogBackedIcebergCatalogOpsDdlTest`, against an in-memory Iceberg catalog: two keys add one metadata version, a later SET keeps the keys it does not name, and a map with a downgrade commits nothing.
- `PaimonConnectorMetadataTablePropertiesTest`, against a local filesystem catalog: two options add one schema version and keep the options they do not name, and a list with an invalid field option commits nothing.
- `IcebergConnectorMetadataDdlTest`, `HiveConnectorMetadataSiblingDelegationTest` and `ConnectorMetadataSurfaceTest` cover the auth wrapping, the HMS forwarding and the SPI surface.
- Each of these changes turned the matching tests red: one alter per Paimon option, one commit per Iceberg key, and refreshing before the connector call. The full suites of fe-connector-spi, -hive, -iceberg and -paimon pass.
- Regression, on a local cluster with the Iceberg docker environment (REST catalog, MinIO, Spark):
- `test_iceberg_alter_properties` reads the properties back through Spark after each statement.
- `test_paimon_alter_properties` checks `$options` and `$schemas`. Its `.out` was generated there: the schema id goes 0, 1, 2 for the two SETs and stays at 2 after the `auto_analyze_policy` statement and after the rejected one.
- Both suites come from branch-4.1. The Paimon one records its results in a `.out` instead of asserting them.
Original author: @suxiaogang223
### Release note
Support `ALTER TABLE ... SET (...)` to change the native properties of Iceberg and Paimon tables. Several properties can be set in one statement, and they are committed together.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- `test_iceberg_alter_properties` and `test_paimon_alter_properties` (external_table_p0).
- [x] Unit Test
- `ModifyTablePropertiesOpTest`, `PluginDrivenExternalCatalogDdlRoutingTest`, `CatalogBackedIcebergCatalogOpsDdlTest`, `IcebergConnectorMetadataDdlTest`, `PaimonConnectorMetadataTablePropertiesTest`, `HiveConnectorMetadataSiblingDelegationTest`, `ConnectorMetadataSurfaceTest`.
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [x] Yes. <!-- Explain the behavior change -->
- `ALTER TABLE ... SET (...)` on an Iceberg or Paimon table sets the table's native properties instead of failing analysis.
- Does this need documentation?
- [ ] No.
- [x] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
- The Iceberg and Paimon catalog pages do not describe `ALTER TABLE ... SET (...)` yet.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #69086:
URL: https://github.com/apache/doris/pull/69086#discussion_r4275521155
##########
fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorTableDdlOps.java:
##########
@@ -82,4 +84,22 @@ default void truncateTable(ConnectorSession session,
throw new DorisConnectorException(
"TRUNCATE TABLE not supported");
}
+
+ /**
+ * Sets connector-native properties on the table identified by {@code handle}, for
+ * {@code ALTER TABLE ... SET ("key" = "value", ...)}. A key in {@code properties} is added or overwritten;
+ * a key not in it keeps its current value.
+ *
+ * <p>The map is one change: the connector must commit every entry or none of them. A statement that
+ * fails after committing part of the map would leave the table in a state the user never asked for.
+ * Properties Doris owns itself, such as {@code auto_analyze_policy}, never reach this method.</p>
+ *
+ * @throws DorisConnectorException if the connector does not support it, or the remote catalog rejects
+ * the change
+ */
+ default void setTableProperties(ConnectorSession session,
+ ConnectorTableHandle handle, Map<String, String> properties) {
Review Comment:
[P2] Bump the connector API major for the new SPI method
This adds a public connector SPI method while `connector.plugin.api.version` and the version pinned in `ConnectorPluginSurfaceTest` remain `13.0`. The loader compares only majors and loads SPI classes from the FE, so a plugin compiled to call this new method is still admitted by an older 13.0 FE whose SPI does not provide it; that call can then fail with `NoSuchMethodError` instead of a version-gate rejection. The version contract in `fe-connector/AGENTS.md` and the parent POM explicitly treats additions as a major change. Please bump the API major and update the pinned version in this PR. The second surface renderer does not include metadata methods, so its unchanged baseline does not remove the need for that bump.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6179590009
<details>
<summary>ClickBench: <b>Total hot run time: 24.74 s</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1, data reload: false
query1 0.01 0.01 0.00
query2 0.10 0.05 0.05
query3 0.27 0.12 0.11
query4 1.60 0.12 0.12
query5 0.25 0.25 0.25
query6 1.17 0.69 0.68
query7 0.05 0.01 0.01
query8 0.06 0.04 0.03
query9 0.41 0.36 0.36
query10 0.61 0.58 0.60
query11 0.22 0.14 0.15
query12 0.18 0.14 0.14
query13 0.51 0.49 0.50
query14 1.01 1.01 1.02
query15 0.64 0.61 0.61
query16 0.32 0.32 0.36
query17 1.14 1.10 1.14
query18 0.23 0.21 0.21
query19 2.06 2.04 2.00
query20 0.02 0.01 0.01
query21 15.52 0.26 0.15
query22 4.42 0.05 0.05
query23 16.26 0.32 0.12
query24 3.30 0.56 0.48
query25 0.11 0.05 0.04
query26 1.44 0.25 0.15
query27 0.04 0.03 0.04
query28 2.02 0.63 0.44
query29 12.52 4.36 3.35
query30 0.28 0.14 0.13
query31 2.76 0.60 0.34
query32 3.22 0.61 0.52
query33 3.18 3.19 3.20
query34 15.52 4.01 3.42
query35 3.34 3.33 3.35
query36 0.54 0.47 0.42
query37 0.10 0.06 0.06
query38 0.04 0.04 0.04
query39 0.04 0.04 0.03
query40 0.16 0.15 0.14
query41 0.09 0.03 0.03
query42 0.04 0.03 0.03
query43 0.04 0.04 0.03
Total cold run time: 95.84 s
Total hot run time: 24.74 s
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6179506395
<details>
<summary>TPC-DS: <b>Total hot run time: 152497 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1, data reload: false
query5 4299 587 453 453
query6 422 205 188 188
query7 4810 442 232 232
query8 323 165 162 162
query9 8776 4006 4010 4006
query10 493 305 253 253
query11 5910 3783 3526 3526
query12 147 90 85 85
query13 1233 452 329 329
query14 6104 4035 3748 3748
query14_1 3518 3507 3508 3507
query15 209 204 188 188
query16 938 443 459 443
query17 872 674 535 535
query18 2420 415 322 322
query19 192 164 140 140
query20 86 84 83 83
query21 210 136 111 111
query22 12930 13051 12851 12851
query23 13510 12905 12466 12466
query23_1 12557 12669 12730 12669
query24 7117 830 466 466
query24_1 491 477 474 474
query25 534 423 366 366
query26 1302 259 140 140
query27 2767 434 271 271
query28 4620 1969 1987 1969
query29 1601 591 460 460
query30 320 231 187 187
query31 1015 916 801 801
query32 144 94 88 88
query33 524 309 248 248
query34 896 875 496 496
query35 758 749 661 661
query36 808 820 727 727
query37 126 100 87 87
query38 1793 1773 1710 1710
query39 813 804 744 744
query39_1 736 730 747 730
query40 238 119 98 98
query41 72 68 67 67
query42 88 85 91 85
query43 360 385 327 327
query44 1287 701 708 701
query45 180 185 166 166
query46 850 961 570 570
query47 2952 3000 3008 3000
query48 300 311 211 211
query49 569 390 287 287
query50 671 278 221 221
query51 10502 10768 10424 10424
query52 79 78 65 65
query53 185 199 147 147
query54 230 202 188 188
query55 72 68 61 61
query56 242 218 216 216
query57 1603 1583 1528 1528
query58 284 265 256 256
query59 2077 2192 1996 1996
query60 284 242 221 221
query61 148 148 143 143
query62 393 344 287 287
query63 194 167 160 160
query64 2720 943 739 739
query65 3297 3242 3236 3236
query66 1800 412 315 315
query67 20125 20009 20261 20009
query68 3006 1014 616 616
query69 395 289 243 243
query70 847 788 783 783
query71 296 218 207 207
query72 2695 2501 2214 2214
query73 513 529 302 302
query74 4603 4453 4309 4309
query75 2335 2308 1951 1951
query76 2314 1043 614 614
query77 341 381 275 275
query78 9944 9821 9196 9196
query79 961 898 540 540
query80 745 428 345 345
query81 558 312 271 271
query82 579 134 114 114
query83 291 191 182 182
query84 309 122 94 94
query85 905 437 375 375
query86 352 239 230 230
query87 1999 1955 1808 1808
query88 3626 2717 2689 2689
query89 339 304 259 259
query90 1770 178 181 178
query91 161 153 127 127
query92 99 89 91 89
query93 1025 1001 581 581
query94 502 305 292 292
query95 578 404 316 316
query96 666 519 235 235
query97 2484 2445 2309 2309
query98 169 151 153 151
query99 773 763 651 651
Total cold run time: 234120 ms
Total hot run time: 152497 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6181562309
# FE Regression Coverage Report
Increment line coverage ` 78.38% (29/37)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/69086_cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1_merge_fe/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/69086_cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1_merge_fe/report/index.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #69086:
URL: https://github.com/apache/doris/pull/69086
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6181899041
# FE UT Coverage Report
Increment line coverage ` 64.86% (24/37)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/69086_cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1/fe_increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/69086_cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1/fe_report/index.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6179353625
<details>
<summary>TPC-H: <b>Total hot run time: 29589 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit cc90cce9b9e6caa407ab52d56e2bc9a135a6d9a1, data reload: false
------ Round 1 ----------------------------------
============================================
q1 17594 5725 5570 5570
q2 2144 325 264 264
q3 10201 1382 829 829
q4 4681 472 340 340
q5 7430 793 526 526
q6 191 194 161 161
q7 758 793 614 614
q8 9254 1351 1086 1086
q9 5614 4281 4268 4268
q10 6828 1290 1015 1015
q11 435 255 238 238
q12 627 401 288 288
q13 18073 3496 2931 2931
q14 284 270 259 259
q15 q16 729 727 678 678
q17 1177 774 582 582
q18 7018 6225 6187 6187
q19 1095 952 612 612
q20 386 340 222 222
q21 5710 2629 2626 2626
q22 394 329 293 293
Total cold run time: 100623 ms
Total hot run time: 29589 ms
----- Round 2, with runtime_filter_mode=off -----
============================================
q1 6496 6519 6448 6448
q2 728 610 567 567
q3 5604 5684 5186 5186
q4 2204 2212 1606 1606
q5 5764 5804 5663 5663
q6 248 198 162 162
q7 2312 2065 1836 1836
q8 3159 2704 2839 2704
q9 8010 7565 7585 7565
q10 3665 3601 3257 3257
q11 608 420 399 399
q12 663 692 505 505
q13 3305 3606 3036 3036
q14 287 287 269 269
q15 q16 654 672 627 627
q17 7847 7095 6939 6939
q18 13199 12265 13121 12265
q19 947 860 867 860
q20 2177 2181 1921 1921
q21 5861 4811 4861 4811
q22 504 454 415 415
Total cold run time: 74242 ms
Total hot run time: 67041 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6176715474
/review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6176713823
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://doris.apache.org/community/how-to-contribute/review-and-ci).
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #69086:
URL: https://github.com/apache/doris/pull/69086#issuecomment-6176715051
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](catalog) Support altering Iceberg and Paimon table properties [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #69086:
URL: https://github.com/apache/doris/pull/69086#discussion_r4279454653
##########
fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorTableDdlOps.java:
##########
@@ -82,4 +84,22 @@ default void truncateTable(ConnectorSession session,
throw new DorisConnectorException(
"TRUNCATE TABLE not supported");
}
+
+ /**
+ * Sets connector-native properties on the table identified by {@code handle}, for
+ * {@code ALTER TABLE ... SET ("key" = "value", ...)}. A key in {@code properties} is added or overwritten;
+ * a key not in it keeps its current value.
+ *
+ * <p>The map is one change: the connector must commit every entry or none of them. A statement that
+ * fails after committing part of the map would leave the table in a state the user never asked for.
+ * Properties Doris owns itself, such as {@code auto_analyze_policy}, never reach this method.</p>
+ *
+ * @throws DorisConnectorException if the connector does not support it, or the remote catalog rejects
+ * the change
+ */
+ default void setTableProperties(ConnectorSession session,
+ ConnectorTableHandle handle, Map<String, String> properties) {
Review Comment:
Not bumping here, on purpose, as on #68874 and #68901. The connector SPI has not shipped in a release: the FE and every connector plugin are built from the same tree and released together, so no released FE serves 13.0 without `setTableProperties`, and pairing plugin jars with an FE from another commit is not a supported installation. Until the SPI ships, methods are added without moving `connector.plugin.api.version`. The new method is recorded in the metadata-method baseline (`connector-metadata-methods.txt`) in this PR, so the surface test still pins it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org