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 d68c804 commit c16175bCopy full SHA for c16175b
rust/cubesql/cubesql/src/compile/engine/df/wrapper.rs
@@ -415,8 +415,16 @@ 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 = if alias_lower != "__user" && alias_lower != "__cubejoinfield" {
420
+ NON_ID_REGEX
421
+ .replace_all(&alias_lower, "_")
422
+ .trim_start_matches("_")
423
+ .to_string()
424
+ } else {
425
+ alias_lower
426
+ };
427
+
428
truncated_alias.truncate(16);
429
let mut alias = truncated_alias.clone();
430
for i in 1..10000 {
0 commit comments