-
Notifications
You must be signed in to change notification settings - Fork 525
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
unify special chars in index property #1670
Conversation
just not allow leading specail char in index property, it's ok a specail char is placed in non-leading position. fix #1638 Change-Id: Id3f0eb39c30da2ff4b11221df0e138cc77c885b2
Codecov Report
@@ Coverage Diff @@
## master #1670 +/- ##
============================================
+ Coverage 66.91% 66.96% +0.05%
- Complexity 7062 7067 +5
============================================
Files 421 421
Lines 34673 34674 +1
Branches 4802 4803 +1
============================================
+ Hits 23200 23221 +21
+ Misses 9128 9108 -20
Partials 2345 2345
Continue to review full report at Codecov.
|
Change-Id: Ie682a7df5ad013808520a4f89af021a50a6086c5
Change-Id: I134ec3cc4e7f330b9c916bf34ba98d9df1cfe090
ci error of postgresql: testAddVertexPropertyWithSpecialValueForSecondaryIndex(com.baidu.hugegraph.core.VertexCoreTest) Time elapsed: 0.455 s <<< ERROR!
com.baidu.hugegraph.backend.BackendException: Failed to commit
at com.baidu.hugegraph.core.VertexCoreTest.testAddVertexPropertyWithSpecialValueForSecondaryIndex(VertexCoreTest.java:6004)
Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO g_si (FIELD_VALUES, EXPIRED_TIME, ELEMENT_IDS, INDEX_LABEL_ID) VALUES ('aa', 0, 'S764:0', 199) ON CONFLICT (FIELD_VALUES, INDEX_LABEL_ID, ELEMENT_IDS) DO UPDATE SET FIELD_VALUES = 'aa', EXPIRED_TIME = 0, ELEMENT_IDS = 'S764:0', INDEX_LABEL_ID = 199 was aborted: ERROR: invalid byte sequence for encoding "UTF8": 0x00 Call getNextException to see other errors in the batch.
at com.baidu.hugegraph.core.VertexCoreTest.testAddVertexPropertyWithSpecialValueForSecondaryIndex(VertexCoreTest.java:6004)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at com.baidu.hugegraph.core.VertexCoreTest.testAddVertexPropertyWithSpecialValueForSecondaryIndex(VertexCoreTest.java:6004) |
@@ -1350,22 +1338,22 @@ private static ConditionQuery constructQuery(ConditionQuery query, | |||
String joinedValues; | |||
// 2.1 All fields have equal-conditions | |||
if (prefixes.size() == fields.size()) { | |||
// Prefix numeric values should be converted to sortable string | |||
// Prefix numeric values should be converted to sort-able string |
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.
why change this word?
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.
The IDE prompt "The word 'sortable' is not correctly spelled", I will revert to "sortable".
just not allow leading special char in index property,
it's ok a special char is placed in non-leading position.
NOTE: not allowed 0x00 byte in any position for pgsql/rocksdb/hbase
fix #1638
Change-Id: Id3f0eb39c30da2ff4b11221df0e138cc77c885b2