|
4 | 4 | import com.microsoft.semantickernel.data.jdbc.JDBCVectorStoreOptions; |
5 | 5 | import com.microsoft.semantickernel.data.jdbc.JDBCVectorStoreRecordCollectionOptions; |
6 | 6 | import com.microsoft.semantickernel.data.vectorsearch.VectorSearchFilter; |
7 | | -import com.microsoft.semantickernel.data.vectorsearch.VectorSearchResult; |
8 | 7 | import com.microsoft.semantickernel.data.vectorsearch.VectorSearchResults; |
9 | 8 | import com.microsoft.semantickernel.data.vectorstorage.VectorStoreRecordCollection; |
10 | 9 | import com.microsoft.semantickernel.data.vectorstorage.options.VectorSearchOptions; |
11 | | -import org.junit.jupiter.api.BeforeEach; |
12 | 10 | import org.junit.jupiter.params.ParameterizedTest; |
13 | 11 | import org.junit.jupiter.params.provider.Arguments; |
14 | 12 | import org.junit.jupiter.params.provider.MethodSource; |
|
24 | 22 | import static org.junit.jupiter.api.Assertions.assertTrue; |
25 | 23 |
|
26 | 24 | public class OracleVectorStoreDataTypeSearchTest extends OracleCommonVectorStoreRecordCollectionTest { |
27 | | - private static final double MIN_NUMBER = 1.0E-130; |
| 25 | + private static final double MIN_DOUBLE = 1.0E-130; |
| 26 | + private static final double MIN_DECIMAL = -1.0E125; |
28 | 27 | private static final BigDecimal BIG_NUMBER = BigDecimal.valueOf(9999999999999999.99); |
29 | 28 |
|
30 | 29 |
|
@@ -120,6 +119,11 @@ void testDataTypesSearch (ClassWithAllBoxedTypes record) { |
120 | 119 | assertEquals(1, results.getTotalCount()); |
121 | 120 | assertEquals(record.getDoubleValue(), results.getResults().get(0).getRecord().getDoubleValue()); |
122 | 121 |
|
| 122 | + System.out.println(record.getDecimalValue()); |
| 123 | + System.out.println(record.getDecimalValue().doubleValue()); |
| 124 | + System.out.println(results.getResults().get(0).getRecord().getDecimalValue()); |
| 125 | + System.out.println(results.getResults().get(0).getRecord().getDecimalValue().doubleValue()); |
| 126 | + |
123 | 127 | // decimal |
124 | 128 | results = collection.searchAsync( |
125 | 129 | null, |
@@ -223,7 +227,7 @@ private static Stream<Arguments> supportedDataTypes() { |
223 | 227 | Arguments.of( |
224 | 228 | new ClassWithAllBoxedTypes( |
225 | 229 | "ID2", false, Byte.MIN_VALUE, Short.MIN_VALUE, Integer.MIN_VALUE, Long.MIN_VALUE, |
226 | | - Float.MIN_VALUE, MIN_NUMBER, BigDecimal.valueOf(MIN_NUMBER), |
| 230 | + Float.MIN_VALUE, MIN_DOUBLE, BigDecimal.valueOf(MIN_DECIMAL), |
227 | 231 | OffsetDateTime.now(), UUID.randomUUID(), new byte[] {Byte.MIN_VALUE, -10, 0, 10, Byte.MAX_VALUE}, |
228 | 232 | Arrays.asList(Float.MIN_VALUE, -10f, 0f, 10f, Float.MAX_VALUE), |
229 | 233 | new Float[] { 0.5f, 3.2f, 7.1f, -4.0f, 2.8f, 10.0f, -1.3f, 5.5f } |
@@ -265,7 +269,7 @@ private static Stream<Arguments> supportedDataPrimitiveTypes() { |
265 | 269 | new ClassWithAllPrimitiveTypes( |
266 | 270 | "ID2", false, Byte.MIN_VALUE, Short.MIN_VALUE, Integer.MIN_VALUE, |
267 | 271 | Long.MIN_VALUE, |
268 | | - Float.MIN_VALUE, MIN_NUMBER, BigDecimal.valueOf(MIN_NUMBER), |
| 272 | + Float.MIN_VALUE, MIN_DOUBLE, BigDecimal.valueOf(MIN_DECIMAL), |
269 | 273 | OffsetDateTime.now(), UUID.randomUUID(), |
270 | 274 | new byte[]{Byte.MIN_VALUE, -10, 0, 10, Byte.MAX_VALUE}, |
271 | 275 | Arrays.asList(Float.MIN_VALUE, -10f, 0f, 10f, Float.MAX_VALUE), |
|
0 commit comments