liujiwen-up opened a new pull request, #657:
URL: https://github.com/apache/doris-flink-connector/pull/657
# Proposed changes
Issue Number: close #xxx
## Problem Summary:
This PR fixes failures when Doris database/table identifiers contain
non-ASCII characters, such as Chinese table names.
Previously, the connector built several Doris HTTP API URLs by directly
concatenating database/table names into the path, for example:
- `/api/{db}/{table}/_schema`
- `/api/{db}/{table}/_query_plan`
- `/api/{db}/{table}/_stream_load`
- `/api/{db}/_stream_load_2pc`
- `/api/enable_light_schema_change/{db}/{table}`
- `/api/query/default_cluster/{db}`
When the table name contains Chinese characters, Flink SQL planning may fail
while fetching schema or query plan from Doris FE.
This PR adds a shared `DorisUrlUtils` helper to encode each HTTP path
segment with UTF-8 percent encoding, and updates the related REST, Stream Load,
Batch Stream Load, 2PC commit, and schema change paths to use it.
The change only encodes HTTP URL path segments. It does not change
`table.identifier`, SQL identifier quoting, Stream Load labels, headers, or
COPY mode behavior.
Added unit tests for:
- URL path segment encoding
- schema and query plan URLs
- Stream Load URLs
- Batch Stream Load URLs
- 2PC commit URLs
- schema change URLs
## Checklist(Required)
1. Does it affect the original behavior: Yes
2. Has unit tests been added: Yes
3. Has document been added or modified: No Need
4. Does it need to update dependencies: No
5. Are there any changes that cannot be rolled back: No
## Further comments
Validation:
```bash
mvn -Pflink1 -pl flink-doris-connector-base
-Dtest=DorisUrlUtilsTest,TestRestService,TestDorisStreamLoad,TestDorisBatchStreamLoad,TestDorisCommitter,SchemaChangeManagerTest
test
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]