Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfengHKU committed Nov 30, 2023
1 parent 7acfb58 commit 977b345
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ class RdfReader {

~RdfReader();

inline void initReader() { initReader(prefixSink, statementSink); }
inline void initCountReader() { initReader(nullptr, countStatementSink); }
inline void initReader() { initReader(prefixHandle, statementHandle); }
inline void initCountReader() { initReader(nullptr, countStatementHandle); }

common::offset_t read(common::DataChunk* dataChunkToRead);
common::offset_t countLine();

private:
static SerdStatus errorHandle(void* handle, const SerdError* error);
static SerdStatus statementSink(void* handle, SerdStatementFlags flags, const SerdNode* graph,
static SerdStatus statementHandle(void* handle, SerdStatementFlags flags, const SerdNode* graph,
const SerdNode* subject, const SerdNode* predicate, const SerdNode* object,
const SerdNode* object_datatype, const SerdNode* object_lang);
static SerdStatus prefixSink(void* handle, const SerdNode* name, const SerdNode* uri);
static SerdStatus prefixHandle(void* handle, const SerdNode* name, const SerdNode* uri);

static SerdStatus countStatementSink(void* handle, SerdStatementFlags flags,
static SerdStatus countStatementHandle(void* handle, SerdStatementFlags flags,
const SerdNode* graph, const SerdNode* subject, const SerdNode* predicate,
const SerdNode* object, const SerdNode* object_datatype, const SerdNode* object_lang);

Expand Down
6 changes: 3 additions & 3 deletions src/processor/operator/persistent/reader/rdf/rdf_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static common::offset_t lookupResourceNode(PrimaryKeyIndex* index, const SerdNod
return offset;
}

SerdStatus RdfReader::statementSink(void* handle, SerdStatementFlags /*flags*/,
SerdStatus RdfReader::statementHandle(void* handle, SerdStatementFlags /*flags*/,
const SerdNode* /*graph*/, const SerdNode* subject, const SerdNode* predicate,
const SerdNode* object, const SerdNode* object_datatype, const SerdNode* /*object_lang*/) {
if (!supportSerdType(subject->type) || !supportSerdType(predicate->type) ||
Expand Down Expand Up @@ -209,7 +209,7 @@ SerdStatus RdfReader::statementSink(void* handle, SerdStatementFlags /*flags*/,
return SERD_SUCCESS;
}

SerdStatus RdfReader::countStatementSink(void* handle, SerdStatementFlags /*flags*/,
SerdStatus RdfReader::countStatementHandle(void* handle, SerdStatementFlags /*flags*/,
const SerdNode* /*graph*/, const SerdNode* subject, const SerdNode* predicate,
const SerdNode* object, const SerdNode* /*object_datatype*/, const SerdNode* /*object_lang*/) {
if (!supportSerdType(subject->type) || !supportSerdType(predicate->type) ||
Expand All @@ -221,7 +221,7 @@ SerdStatus RdfReader::countStatementSink(void* handle, SerdStatementFlags /*flag
return SERD_SUCCESS;
}

SerdStatus RdfReader::prefixSink(void* handle, const SerdNode* /*name*/, const SerdNode* uri) {
SerdStatus RdfReader::prefixHandle(void* handle, const SerdNode* /*name*/, const SerdNode* uri) {
auto reader = reinterpret_cast<RdfReader*>(handle);
reader->currentPrefix = reinterpret_cast<const char*>(uri->buf);
return SERD_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/rdf/spb1k.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
16
-STATEMENT MATCH (s:spb_resource_t)-[]->(:spb_literal_t) WHERE s.iri = "http://www.bbc.co.uk/things/3#id" RETURN COUNT(*);
---- 1
7
7

0 comments on commit 977b345

Please sign in to comment.