Skip to content

Commit

Permalink
Merge pull request #46 from psilberk/error-fix
Browse files Browse the repository at this point in the history
Fixed error failures after merge
  • Loading branch information
psilberk authored Jan 30, 2025
2 parents 2becc65 + 0c6affb commit 34b4935
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,16 @@ private SQLFilters() {}
*
* @return The equivalent SQLFilter, which may be {@link #EMPTY} if the input <code>Filter</code> is null.
*
* @throws IllegalArgumentException If the class of the Filter is not recognized.
* @throws UnsupportedOperationException If the class of the Filter is not recognized.
*/
static SQLFilter create(Filter filter, BiFunction<String, OracleType, String> keyMapper) {
if (filter == null) return EMPTY;

Class<? extends Filter> filterClass = filter.getClass();
FilterConstructor constructor = CONSTRUCTORS.get(filterClass);

if (constructor == null) throw new IllegalArgumentException("Unrecognized Filter class: " + filterClass);
if (constructor == null)
throw new UnsupportedOperationException("Unsupported filter type: " + filterClass.getName());

return constructor.construct(filter, keyMapper);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class OracleEmbeddingStoreWithRemovalIT extends EmbeddingStoreWithRemovalIT {

private static final OracleEmbeddingStore EMBEDDING_STORE = CommonTestOperations.newEmbeddingStore();
private final OracleEmbeddingStore embeddingStore = CommonTestOperations.newEmbeddingStore();

@BeforeEach
public void clearTable() {
Expand All @@ -21,7 +21,7 @@ public void clearTable() {

@Override
protected EmbeddingStore<TextSegment> embeddingStore() {
return EMBEDDING_STORE;
return embeddingStore;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private void verifyIndexExists(CreateOption createOption, String tableName, Stri
throws SQLException {
try (Connection connection = getDataSource().getConnection();
PreparedStatement preparedStatement = connection.prepareStatement(
"SELECT 'OK' FROM user_indexes WHERE table_name=? AND index_name=? AND index_type?")) {
"SELECT 'OK' FROM user_indexes WHERE table_name=? AND index_name=? AND index_type=?")) {
preparedStatement.setString(1, tableName);
preparedStatement.setString(2, indexName);
preparedStatement.setString(3, indexType);
Expand Down

0 comments on commit 34b4935

Please sign in to comment.