sollhui commented on PR #67407: URL: https://github.com/apache/doris/pull/67407#issuecomment-6307105466
Review of head `953e7a7a5fb1f526d485a423d24ed96ee1f3658d`: **[P2] Use the same case-insensitive comparison as Table when rejecting column conflicts** In [`ExternalFileTableValuedFunction.java`, lines 293–298](https://github.com/apache/doris/blob/953e7a7a5fb1f526d485a423d24ed96ee1f3658d/fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java#L293-L298), `String.toLowerCase()` depends on the JVM default locale. With `tr_TR` and these properties: ```text csv_schema = "id:int" path_partition_keys = "ID" ``` `"ID".toLowerCase()` becomes `"ıd"` (dotless i), so the new check accepts both `id` and `ID`. However, [`Table.nameToColumn`](https://github.com/apache/doris/blob/953e7a7a5fb1f526d485a423d24ed96ee1f3658d/fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java#L158-L162) uses `String.CASE_INSENSITIVE_ORDER`, which considers those names equal and overwrites the CSV column entry with the path column. The full schema consequently has two columns while the name index has only one. Please use a `TreeSet<>(String.CASE_INSENSITIVE_ORDER)` for conflict detection, matching Table's lookup semantics, and add a test with the default locale set to `tr_TR` (restoring the original locale in `finally`). Confirmed with an isolated Java reproduction of the conflict check and Table's name-index comparison. Full FE and S3 regression tests were not rerun during this review. No other definite regressions were found in the reviewed scan path. -- 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]
