We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40b3708 commit db2ab96Copy full SHA for db2ab96
rust/cubesql/cubesql/src/compile/engine/df/wrapper.rs
@@ -415,8 +415,14 @@ impl Remapper {
415
static NON_ID_REGEX: LazyLock<Regex> =
416
LazyLock::new(|| Regex::new(r"[^a-zA-Z0-9_]").unwrap());
417
418
- let alias = start_from;
419
- let mut truncated_alias = NON_ID_REGEX.replace_all(&alias, "_").to_lowercase();
+ let alias_lower = start_from.clone().to_lowercase();
+ let mut truncated_alias =
420
+ if !alias_lower.contains("__user") && !alias_lower.contains("__cubejoinfield") {
421
+ NON_ID_REGEX.replace_all(&alias_lower, "_").to_string()
422
+ } else {
423
+ alias_lower
424
+ };
425
+
426
truncated_alias.truncate(16);
427
let mut alias = truncated_alias.clone();
428
for i in 1..10000 {
0 commit comments