Skip to content

Commit

Permalink
opensearch-project#1506: Remove reservedSymbolTable and use HIDDEN_FI…
Browse files Browse the repository at this point in the history
…ELD_NAME instead

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
  • Loading branch information
acarbonetto committed Aug 3, 2023
1 parent bc27060 commit dd3407e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ public void qualified_name_with_qualifier() {
public void qualified_name_with_reserved_symbol() {
analysisContext.push();

analysisContext.peek().addReservedWord(new Symbol(Namespace.FIELD_NAME, "_reserved"), STRING);
analysisContext.peek().addReservedWord(new Symbol(Namespace.FIELD_NAME, "_priority"), FLOAT);
analysisContext.peek().define(new Symbol(Namespace.HIDDEN_FIELD_NAME, "_reserved"), STRING);
analysisContext.peek().define(new Symbol(Namespace.HIDDEN_FIELD_NAME, "_priority"), FLOAT);
analysisContext.peek().define(new Symbol(Namespace.INDEX_NAME, "index_alias"), STRUCT);
assertAnalyzeEqual(
DSL.ref("_priority", FLOAT),
Expand All @@ -246,7 +246,7 @@ public void qualified_name_with_reserved_symbol() {
qualifiedName("index_alias", "_reserved")
);

// reserved fields take priority over symbol table
// cannot replace an existing field type
analysisContext.peek().define(new Symbol(Namespace.FIELD_NAME, "_reserved"), LONG);
assertAnalyzeEqual(
DSL.ref("_reserved", STRING),
Expand Down

0 comments on commit dd3407e

Please sign in to comment.