-
Notifications
You must be signed in to change notification settings - Fork 85
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 INT8 type #1994
Add INT8 type #1994
Conversation
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.
Good progress!
You may need to change the ValueVector,factorizedTable classes(which are used in query processing), so we can store the INT8 value in these internal data structures.
To add a test in kuzu:
We have a small dataset that used for testing: tinysnb (dataset/tinysnb). You can add a INT8 column in the vMovies.csv file. We usually write simple projection tests in this file: test/test_files/tinysnb/projection/single_label.test
dd21ad2
to
4845cd4
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1994 +/- ##
==========================================
- Coverage 90.03% 89.95% -0.08%
==========================================
Files 909 909
Lines 32928 32974 +46
==========================================
+ Hits 29646 29663 +17
- Misses 3282 3311 +29
☔ View full report in Codecov by Sentry. |
src/common/arrow/arrow_row_batch.cpp
Outdated
@@ -274,6 +277,9 @@ void ArrowRowBatch::copyNonNullValue( | |||
case LogicalTypeID::INT16: { | |||
templateCopyNonNullValue<LogicalTypeID::INT16>(vector, typeInfo, value, pos); | |||
} break; | |||
case LogicalTypeID::INT8: { | |||
templateCopyNonNullValue<LogicalTypeID::INT8>(vector, typeInfo, value, pos); | |||
} break; |
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.
You can remove the case statements in this file.
@@ -22,6 +22,8 @@ std::string PhysicalTypeUtils::physicalTypeToString(PhysicalTypeID physicalType) | |||
return "INT32"; | |||
case PhysicalTypeID::INT16: | |||
return "INT16"; | |||
case PhysicalTypeID::INT8: | |||
return "INT8"; |
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.
This is for exception handling, keep this.
@@ -502,6 +517,9 @@ void Value::serialize(FileInfo* fileInfo, uint64_t& offset) const { | |||
case PhysicalTypeID::INT16: { | |||
SerDeser::serializeValue(val.int16Val, fileInfo, offset); | |||
} break; | |||
case PhysicalTypeID::INT8: { | |||
SerDeser::serializeValue(val.int8Val, fileInfo, offset); |
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.
Keep switch cases in this file, they are used for literalExpression in UDF. You don't need to add a test for this.
84b1c33
to
6ed50fb
Compare
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.
Remember to increase the KUZU_VERSION in CMAKE_LISTS.TXT, and src/include/storage/storage_info.h
.
e43eea7
to
483dfa3
Compare
483dfa3
to
db80fff
Compare
Completing the numerical typing system - add INT8 dataType, so that entries of type INT8 can be stored into the table.
An example can be found in StudyAt.csv.