Skip to content

Commit

Permalink
fix: Add datstream support into strategy mechanism to only query data…
Browse files Browse the repository at this point in the history
… streams when that is actually supported
  • Loading branch information
kuseman committed Sep 12, 2024
1 parent 2e4384c commit b50d99b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ public boolean wrapNestedSortPathInObject()
{
return false;
}

@Override
public boolean supportsDataStreams()
{
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ public boolean wrapNestedSortPathInObject()
{
return false;
}

@Override
public boolean supportsDataStreams()
{
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ public boolean wrapNestedSortPathInObject()
{
return false;
}

@Override
public boolean supportsDataStreams()
{
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ public boolean supportsTypes()
{
return false;
}

@Override
public boolean supportsDataStreams()
{
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ interface ElasticStrategy

/** Returns whether this elastic needs the nested sort path in a nested object or a plain property */
boolean wrapNestedSortPathInObject();

/** Returns true if this elastic supports data streams or not. */
boolean supportsDataStreams();
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,12 @@ static ElasticsearchMeta getMeta(IQuerySession session, String catalogAlias, Str
}
}

// Fetch data stream mappings
appendDataStreamMappings(session, catalogAlias, endpoint, index, result);
if (version.getStrategy()
.supportsDataStreams())
{
// Fetch data stream mappings
appendDataStreamMappings(session, catalogAlias, endpoint, index, result);
}

return new ElasticsearchMeta(version, result);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ public boolean wrapNestedSortPathInObject()
{
return true;
}

@Override
public boolean supportsDataStreams()
{
return true;
}
}

0 comments on commit b50d99b

Please sign in to comment.