Skip to content

Commit

Permalink
fix: add equals to ASToptions_clause (#138)
Browse files Browse the repository at this point in the history
Fixes #117
  • Loading branch information
nielm committed Jun 19, 2024
1 parent 6c42a77 commit 1fddeea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ public Map<String, String> getKeyValueMap() {
return AstTreeUtils.getChildrenAssertType(children, ASToption_key_val.class).stream()
.collect(Collectors.toMap(ASToption_key_val::getKey, ASToption_key_val::getValue));
}

@Override
public boolean equals(Object obj) {
return toString().equals(obj.toString());
}
}
2 changes: 1 addition & 1 deletion src/test/resources/newDdl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ STORING (scol1, scol3);

CREATE SEARCH INDEX AlbumsIndex
ON Albums (col1, col2, col3)
OPTIONS (sort_order_sharding=TRUE)

== TEST 59 Add stored col to search index

Expand All @@ -506,4 +507,3 @@ CREATE SEARCH INDEX AlbumsIndex
ON Albums (col1, col2)

==

8 changes: 2 additions & 6 deletions src/test/resources/originalDdl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ CREATE SEARCH INDEX AlbumsIndex ON Albums ( AlbumTitle_Tokens ASC, Rating_Tokens

== TEST 57 Changing search index - before and after table changes

create table test1 ( col1 int64, col2 int64 ) primary key (col1);
create table test1 ( col1 int64, col2 int64 ) primary key (col1) ;

CREATE SEARCH INDEX AlbumsIndex
ON Albums (col1, col2)
Expand All @@ -491,6 +491,7 @@ STORING (scol1, scol2);

CREATE SEARCH INDEX AlbumsIndex
ON Albums (col1, col2)
OPTIONS (sort_order_sharding=TRUE)

== TEST 59 Add stored col to search index

Expand All @@ -504,8 +505,3 @@ ON Albums (col1, col2)
STORING (scol1)

==





0 comments on commit 1fddeea

Please sign in to comment.