-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix compiling error by adding meta fields checker before 7DOT8 in legacy SQL #2701
Fix compiling error by adding meta fields checker before 7DOT8 in legacy SQL #2701
Conversation
…acy SQL Signed-off-by: Lantao Jin <[email protected]>
Could any maintainer help to rerun failed CI? |
The original comment for the deleted constant mentions that |
@@ -41,6 +43,19 @@ public class Util { | |||
|
|||
public static final String NESTED_JOIN_TYPE = "NestedJoinType"; | |||
|
|||
public static final Set<String> META_FIELDS_BEFORE_7DOT8 = |
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.
- Can we wrap this with a static method so we can change implementation easily?
- If we go ahead with this approach, please add comment regarding this is not ideal solution.
- What does the suffix
7D0T8
mean?
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.
7DOT8 is referring to ES 7.8.
"_ttl" and "_timestamp" were removed in ES6. See https://www.elastic.co/blog/elasticsearch-5-0-0-alpha4-released
"_type" was renamed to "_nested_path" in OS 2: opensearch-project/OpenSearch#3196
"_size" is not a built-in metadata mapper, it comes from the mapper-size plugin which is not installed by default. Using mapperService.isMetadataField("_size") should return true if the mapper-size plugin is installed in the cluster.
The other values in this list still exist and are built-in metadata fields so mapperService.isMetadataField() should return true.
@@ -41,6 +43,19 @@ public class Util { | |||
|
|||
public static final String NESTED_JOIN_TYPE = "NestedJoinType"; | |||
|
|||
public static final Set<String> META_FIELDS_BEFORE_7DOT8 = | |||
Collections.unmodifiableSet( |
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.
nit: It's simpler to use ImmutableSet.of
Revert commit PR is raised and we can be unblocked once that is merged. |
Yep, revert PR merged, close this one. |
Description
Fix compiling error by adding meta fields checker before 7DOT8 in legacy SQL
Issues Resolved
#2699
Check List
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.