#2550 Allowing joins when index names start with a period#2948
#2550 Allowing joins when index names start with a period#2948jzonthemtn wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
…period. Signed-off-by: Jeff <jeff.zemerick@mtnfog.com>
| "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.
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` qCould 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_idThere was a problem hiding this comment.
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 ., the period is not included in the backticks.
| startsWithPeriod = true; | ||
| text = quote + text.substring(2); | ||
| } | ||
| String[] strs = text.split("\\."); |
There was a problem hiding this comment.
Just wonder if any easier way to do this. Essentially, we just want to split from the second dot if text starts with . or `. ?
|
This PR is stalled because it has been open for 30 days with no activity. |
|
Hi @jzonthemtn, just wanna check do we still need this change? |
|
@RyanL1997 Yes, it would be helpful to allow joins on indexes whose names start with periods. It can be worked around by renaming the indexes but I don't think it's a significant change of code to fix. |
Description
Allows for join operations on indexes whose names start with periods.
Related Issues
Resolves #2550
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.