Skip to content

Commit ced785b

Browse files
authored
Disable spotless plugin (#15)
* integration tests * Added oracle module to BOM * Disable spotless for oracle store and result of spotless apply
1 parent f78b2ab commit ced785b

File tree

7 files changed

+47
-30
lines changed

7 files changed

+47
-30
lines changed

data/semantickernel-data-jdbc/src/main/java/com/microsoft/semantickernel/data/jdbc/JDBCVectorStoreQueryProvider.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -696,18 +696,19 @@ public String getEqualToFilter(EqualToFilterClause filterClause) {
696696
@Override
697697
public String getAnyTagEqualToFilter(AnyTagEqualToFilterClause filterClause) {
698698
String fieldName = JDBCVectorStoreQueryProvider
699-
.validateSQLidentifier(filterClause.getFieldName());
699+
.validateSQLidentifier(filterClause.getFieldName());
700700

701701
return String.format("%s LIKE ?", fieldName);
702702
}
703-
703+
704704
@Override
705-
public <Record> VectorStoreRecordMapper<Record, ResultSet> getVectorStoreRecordMapper(Class<Record> recordClass,
706-
VectorStoreRecordDefinition recordDefinition) {
705+
public <Record> VectorStoreRecordMapper<Record, ResultSet> getVectorStoreRecordMapper(
706+
Class<Record> recordClass,
707+
VectorStoreRecordDefinition recordDefinition) {
707708
return JDBCVectorStoreRecordMapper.<Record>builder()
708-
.withRecordClass(recordClass)
709-
.withVectorStoreRecordDefinition(recordDefinition)
710-
.build();
709+
.withRecordClass(recordClass)
710+
.withVectorStoreRecordDefinition(recordDefinition)
711+
.build();
711712
}
712713

713714
/**
@@ -765,5 +766,4 @@ public JDBCVectorStoreQueryProvider build() {
765766
}
766767
}
767768

768-
769769
}

data/semantickernel-data-jdbc/src/main/java/com/microsoft/semantickernel/data/jdbc/SQLVectorStoreQueryProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ <Record> VectorSearchResults<Record> search(String collectionName,
160160
* @return the record mapper that maps JDBC result sets to the given record.
161161
*/
162162
<Record> VectorStoreRecordMapper<Record, ResultSet> getVectorStoreRecordMapper(
163-
final Class<Record> recordClass,
164-
final VectorStoreRecordDefinition recordDefinition);
163+
final Class<Record> recordClass,
164+
final VectorStoreRecordDefinition recordDefinition);
165165

166166
/**
167167
* The builder for the JDBC vector store query provider.

data/semantickernel-data-oracle/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@
9797
<skip>true</skip>
9898
</configuration>
9999
</plugin>
100+
<plugin>
101+
<groupId>com.diffplug.spotless</groupId>
102+
<artifactId>spotless-maven-plugin</artifactId>
103+
<configuration>
104+
<skip>true</skip>
105+
</configuration>
106+
</plugin>
100107
</plugins>
101108
</build>
102109
</project>

data/semantickernel-data-postgres/src/main/java/com/microsoft/semantickernel/data/jdbc/postgres/PostgreSQLVectorStoreQueryProvider.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,18 +442,19 @@ public List<Object> getFilterParameters(VectorSearchFilter filter) {
442442
@Override
443443
public String getAnyTagEqualToFilter(AnyTagEqualToFilterClause filterClause) {
444444
String fieldName = JDBCVectorStoreQueryProvider
445-
.validateSQLidentifier(filterClause.getFieldName());
445+
.validateSQLidentifier(filterClause.getFieldName());
446446

447447
return String.format("%s @> ?::jsonb", fieldName);
448448
}
449-
449+
450450
@Override
451-
public <Record> VectorStoreRecordMapper<Record, ResultSet> getVectorStoreRecordMapper(Class<Record> recordClass,
452-
VectorStoreRecordDefinition recordDefinition) {
451+
public <Record> VectorStoreRecordMapper<Record, ResultSet> getVectorStoreRecordMapper(
452+
Class<Record> recordClass,
453+
VectorStoreRecordDefinition recordDefinition) {
453454
return PostgreSQLVectorStoreRecordMapper.<Record>builder()
454-
.withRecordClass(recordClass)
455-
.withVectorStoreRecordDefinition(recordDefinition)
456-
.build();
455+
.withRecordClass(recordClass)
456+
.withVectorStoreRecordDefinition(recordDefinition)
457+
.build();
457458
}
458459

459460
/**

samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/java/com/microsoft/semantickernel/samples/syntaxexamples/memory/VectorStoreWithOracle.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ public static void main(String[] args) throws SQLException {
3939
.build();
4040

4141
// Get a collection from the vector store
42-
VectorStoreRecordCollection<String, Hotel> collection =
43-
vectorStore.getCollection("skhotels",
44-
JDBCVectorStoreRecordCollectionOptions.<Hotel>builder()
45-
.withRecordClass(Hotel.class)
46-
.build());
42+
VectorStoreRecordCollection<String, Hotel> collection = vectorStore.getCollection(
43+
"skhotels",
44+
JDBCVectorStoreRecordCollectionOptions.<Hotel>builder()
45+
.withRecordClass(Hotel.class)
46+
.build());
4747

4848
// Create the collection if it doesn't exist yet.
4949
collection.createCollectionAsync().block();
5050

5151
collection.upsertAsync(new Hotel("1",
52-
"HotelOne",
53-
"Desc for HotelOne",
54-
Collections.emptyList(), Collections.emptyList()),
55-
null)
52+
"HotelOne",
53+
"Desc for HotelOne",
54+
Collections.emptyList(), Collections.emptyList()),
55+
null)
5656
.block();
5757

5858
}

samples/semantickernel-learn-resources/src/main/java/com/microsoft/semantickernel/samples/documentationexamples/data/vectorstores/oracle/Book.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232

3333
public class Book {
3434

35-
public Book() {}
35+
public Book() {
36+
}
3637

3738
public Book(String isbn, String title, String author, int pages,
3839
List<String> tags, String summary, List<Float> summaryEmbedding) {
@@ -60,7 +61,7 @@ public Book(String isbn, String title, String author, int pages,
6061
@VectorStoreRecordData(isFilterable = true)
6162
private List<String> tags;
6263

63-
@VectorStoreRecordData( isFilterable = true, isFullTextSearchable = true )
64+
@VectorStoreRecordData(isFilterable = true, isFullTextSearchable = true)
6465
private String summary;
6566

6667
@VectorStoreRecordVector(dimensions = 2)

semantickernel-api-data/src/main/java/com/microsoft/semantickernel/data/vectorstorage/definition/VectorStoreRecordDefinition.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ public static VectorStoreRecordDefinition fromRecordClass(Class<?> recordClass)
194194
dataFields.add(VectorStoreRecordDataField.builder()
195195
.withName(field.getName())
196196
.withStorageName(storageName)
197-
.withFieldType(field.getType(), List.class.equals(field.getType()) ? (Class<?>)((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0] : null)
197+
.withFieldType(field.getType(),
198+
List.class.equals(field.getType())
199+
? (Class<?>) ((ParameterizedType) field.getGenericType())
200+
.getActualTypeArguments()[0]
201+
: null)
198202
.isFilterable(dataAttribute.isFilterable())
199203
.build());
200204
}
@@ -210,7 +214,11 @@ public static VectorStoreRecordDefinition fromRecordClass(Class<?> recordClass)
210214
vectorFields.add(VectorStoreRecordVectorField.builder()
211215
.withName(field.getName())
212216
.withStorageName(storageName)
213-
.withFieldType(field.getType(), List.class.equals(field.getType()) ? (Class<?>)((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0] : null)
217+
.withFieldType(field.getType(),
218+
List.class.equals(field.getType())
219+
? (Class<?>) ((ParameterizedType) field.getGenericType())
220+
.getActualTypeArguments()[0]
221+
: null)
214222
.withDimensions(vectorAttribute.dimensions())
215223
.withIndexKind(vectorAttribute.indexKind())
216224
.withDistanceFunction(vectorAttribute.distanceFunction())

0 commit comments

Comments
 (0)