Skip to content
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

Implement loader for blob type #1693

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Implement loader for blob type #1693

merged 1 commit into from
Jun 20, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Jun 19, 2023

Implement data loading for BLOB type.
DDL grammar to define a blob property: propertyNAME BYTEA

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 84.21% and project coverage change: -0.02 ⚠️

Comparison is base (90d7b3f) 91.16% compared to head (2b75b18) 91.14%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1693      +/-   ##
==========================================
- Coverage   91.16%   91.14%   -0.02%     
==========================================
  Files         735      735              
  Lines       26773    26796      +23     
==========================================
+ Hits        24407    24424      +17     
- Misses       2366     2372       +6     
Impacted Files Coverage Δ
src/include/common/string_utils.h 100.00% <ø> (ø)
src/include/common/types/types.h 100.00% <ø> (ø)
...de/storage/in_mem_storage_structure/in_mem_lists.h 80.76% <ø> (ø)
src/storage/copier/table_copy_utils.cpp 78.18% <ø> (ø)
.../storage/in_mem_storage_structure/in_mem_lists.cpp 66.82% <18.18%> (-2.75%) ⬇️
src/common/string_utils.cpp 97.14% <100.00%> (+0.59%) ⬆️
src/common/types/blob.cpp 86.66% <100.00%> (+3.33%) ⬆️
src/common/types/types.cpp 89.09% <100.00%> (+0.29%) ⬆️
src/function/built_in_aggregate_functions.cpp 94.73% <100.00%> (-0.17%) ⬇️
src/include/function/cast/cast_operations.h 98.38% <100.00%> (+0.05%) ⬆️
... and 8 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

src/common/types/blob.cpp Show resolved Hide resolved
src/common/types/types.cpp Outdated Show resolved Hide resolved
src/common/types/types.cpp Show resolved Hide resolved
src/parser/transformer.cpp Outdated Show resolved Hide resolved
@@ -28,7 +28,7 @@ def init_tiny_snb(tmp_path):
"STRING[], stock STRUCT(price INT64[], volume INT64)), PRIMARY KEY (ID));")
conn.execute('COPY organisation FROM "../../../dataset/tinysnb/vOrganisation.csv"')
conn.execute('CREATE NODE TABLE movies (name STRING, length INT32, note STRING, description STRUCT(rating DOUBLE, '
'views INT64, release TIMESTAMP, film DATE), PRIMARY KEY (name))')
'views INT64, release TIMESTAMP, film DATE), content BYTEA, PRIMARY KEY (name))')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave this to others. But we should just let python test to read from schema.cypher and copy.cypher so that we don't need to change this. I guess there is an issue about refactor python test and you can add this to that issue

common::Blob::fromString(input, result.value.getDataWritable());
common::Blob::fromString(reinterpret_cast<const char*>(input.getData()), input.len,
result.value.getDataWritable());
if (!common::ku_string_t::isShortString(result.value.len)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can have a addBlob function in StringVector. If not, merge the check between l55 and l62

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't merge l62-64 to l55, because we can only copy the string prefix after we have done copying the overflowbuffer.

@acquamarin acquamarin merged commit f0e7225 into master Jun 20, 2023
8 checks passed
@acquamarin acquamarin deleted the blob-loading branch June 20, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants