-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test to check data and index types compatibility #14493
base: master
Are you sure you want to change the base?
Add test to check data and index types compatibility #14493
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14493 +/- ##
============================================
- Coverage 61.75% 55.53% -6.22%
- Complexity 207 790 +583
============================================
Files 2436 2100 -336
Lines 133233 110662 -22571
Branches 20636 17582 -3054
============================================
- Hits 82274 61458 -20816
+ Misses 44911 44316 -595
+ Partials 6048 4888 -1160
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Why disable by default? this would be a good thing to have running to catch combination regressions? |
It is rather slow when reload fails in the background, there's no feedback and test waits 5 seconds before marking test case as failed. |
Nice! This can give us big confidence! |
if ("json".equals(indexType) && ((field.getDataType() != DataType.STRING && field.getDataType() != DataType.JSON) | ||
|| !field.isSingleValueField())) { | ||
throw new RuntimeException( | ||
"JSON index can only be applied to single value column of STRING or JSON data type!"); | ||
} | ||
|
||
if ("vector".equals(indexType) && (field.getDataType() != DataType.FLOAT || field.isSingleValueField())) { | ||
throw new RuntimeException("VECTOR index can only be applied to Float Array columns"); | ||
} | ||
|
||
if (("text".equals(indexType) || "native_text".equals(indexType)) && field.getDataType() != DataType.STRING) { | ||
throw new RuntimeException("Text index is currently only supported on STRING columns"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. What does this failure means? If we want to skip these cases we can either:
- Preferred option: Filter them out in
fieldsAndIndexTypes
- Alternatively: We can throw SkipException, which makes TestNG to skip the test.
... | ||
} */ | ||
// no params | ||
indexes.put("bloom", new ObjectNode(JsonNodeFactory.instance)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indexes.put("bloom", new ObjectNode(JsonNodeFactory.instance)); | |
indexes.put("bloom", JsonUtils.newObjectNode()); |
ObjectNode resolutions = new ObjectNode(JsonNodeFactory.instance); | ||
ArrayNode res = new ArrayNode(JsonNodeFactory.instance); | ||
res.add(13).add(5).add(6); | ||
resolutions.put("resolutions", res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ObjectNode resolutions = new ObjectNode(JsonNodeFactory.instance); | |
ArrayNode res = new ArrayNode(JsonNodeFactory.instance); | |
res.add(13).add(5).add(6); | |
resolutions.put("resolutions", res); | |
ObjectNode resolutions = JsonUtils.stringToJsonNode("{\"resolutions\": [13, 5, 6]}"); |
PR adds integration test (disabled by default) that checks compatibility between combinations of:
and reports the outcome .