-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2550 Allowing joins when index names start with a period #2948
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,20 +23,25 @@ public class BackticksUnquoterTest { | |
public void assertNotQuotedStringShouldKeepTheSame() { | ||
assertThat(unquoteSingleField("identifier"), equalTo("identifier")); | ||
assertThat(unquoteFullColumn("identifier"), equalTo("identifier")); | ||
assertThat(unquoteFullColumn(".identifier"), equalTo(".identifier")); | ||
} | ||
|
||
@Test | ||
public void assertStringWithOneBackTickShouldKeepTheSame() { | ||
assertThat(unquoteSingleField("`identifier"), equalTo("`identifier")); | ||
assertThat(unquoteFullColumn("`identifier"), equalTo("`identifier")); | ||
assertThat(unquoteFullColumn("`.identifier"), equalTo("`.identifier")); | ||
} | ||
|
||
@Test | ||
public void assertBackticksQuotedStringShouldBeUnquoted() { | ||
assertThat("identifier", equalTo(unquoteSingleField("`identifier`"))); | ||
assertThat(".identifier", equalTo(unquoteSingleField("`.identifier`"))); | ||
|
||
assertThat( | ||
"identifier1.identifier2", equalTo(unquoteFullColumn("`identifier1`.`identifier2`"))); | ||
assertThat("identifier1.identifier2", equalTo(unquoteFullColumn("`identifier1`.identifier2"))); | ||
assertThat( | ||
".identifier1.identifier2", equalTo(unquoteFullColumn("`.identifier1`.`identifier2`"))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the queries (without join) work before this fixing? select q.query_id
from .ubi_log_queries q
select q.query_id
from `.ubi_log_queries` q Could you add some tests to verify the objective issue is fixed: select q.query_id
from .ubi_log_queries q join .ubi_log_events e
on q.query_id = e.query_id
select q.query_id
from `.ubi_log_queries` q join `.ubi_log_events` e
on q.query_id = e.query_id There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, those queries work fine. I'm open to testing suggestions, but the issue is the presence of the period inside the backticks. When an index starts with a |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wonder if any easier way to do this. Essentially, we just want to split from the second dot if text starts with
.
or`.
?