Skip to content

Commit

Permalink
Removed some unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Jordan <[email protected]>
  • Loading branch information
normanj-bitquill committed Oct 24, 2024
1 parent d58b6dc commit 69226c8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private Settings defaultSettings() {
new ImmutableMap.Builder<Key, Object>()
.put(Key.QUERY_SIZE_LIMIT, 200)
.put(Key.SQL_PAGINATION_API_SEARCH_AFTER, true)
.put(Key.FIELD_TYPE_TOLERANCE, false)
.put(Key.FIELD_TYPE_TOLERANCE, true)
.build();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ private OpenSearchRequest buildRequestWithPit(
int size = requestedTotalSize;
FetchSourceContext fetchSource = this.sourceBuilder.fetchSource();
List<String> includes = fetchSource != null ? Arrays.asList(fetchSource.includes()) : List.of();
boolean fieldTypeTolerance = settings.getSettingValue(Settings.Key.FIELD_TYPE_TOLERANCE);

if (pageSize == null) {
if (startFrom + size > maxResultWindow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ void explain_successfully() {
Settings settings = mock(Settings.class);
when(settings.getSettingValue(SQL_CURSOR_KEEP_ALIVE)).thenReturn(TimeValue.timeValueMinutes(1));
when(settings.getSettingValue(Settings.Key.SQL_PAGINATION_API_SEARCH_AFTER)).thenReturn(true);
when(settings.getSettingValue(Settings.Key.FIELD_TYPE_TOLERANCE)).thenReturn(true);

OpenSearchExprValueFactory exprValueFactory = mock(OpenSearchExprValueFactory.class);
final var name = new OpenSearchRequest.IndexName("test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public void setup() {
@Test
void test_protect_indexScan() {
when(settings.getSettingValue(Settings.Key.SQL_PAGINATION_API_SEARCH_AFTER)).thenReturn(true);
when(settings.getSettingValue(Settings.Key.FIELD_TYPE_TOLERANCE)).thenReturn(true);

String indexName = "test";
final int maxResultWindow = 10000;
Expand Down

0 comments on commit 69226c8

Please sign in to comment.