Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
acquamarin committed Feb 16, 2025
1 parent 0e61d73 commit e0fa139
Show file tree
Hide file tree
Showing 25 changed files with 149 additions and 58 deletions.
23 changes: 19 additions & 4 deletions extension/fts/src/catalog/fts_index_catalog_entry.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "catalog/fts_index_catalog_entry.h"

#include "catalog/catalog.h"
#include "catalog/catalog_entry/table_catalog_entry.h"
#include "common/serializer/buffered_reader.h"
#include "common/serializer/buffered_serializer.h"
#include "function/fts_utils.h"
#include "main/client_context.h"

namespace kuzu {
Expand All @@ -30,7 +30,7 @@ std::unique_ptr<FTSIndexAuxInfo> FTSIndexAuxInfo::deserialize(
}

std::string FTSIndexAuxInfo::toCypher(const catalog::IndexCatalogEntry& indexEntry,
const main::ClientContext* context) const {
const main::ClientContext* context, std::string exportPath) const {
std::string cypher;
auto catalog = context->getCatalog();
auto tableCatalogEntry =
Expand All @@ -43,10 +43,25 @@ std::string FTSIndexAuxInfo::toCypher(const catalog::IndexCatalogEntry& indexEnt
common::stringFormat("'{}'{}", tableCatalogEntry->getProperty(propertyIDs[i]).getName(),
i == propertyIDs.size() - 1 ? "" : ", ");
}
cypher += common::stringFormat("CALL CREATE_FTS_INDEX('{}', '{}', [{}], stemmer := '{}');",
tableName, indexEntry.getIndexName(), std::move(propertyStr), config.stemmer);
std::string stopWordsName = "default";
if (config.stopWordsTableName != FTSUtils::getDefaultStopWordsTableName()) {
stopWordsName = common::stringFormat("{}/{}.csv", exportPath, config.stopWordsTableName);
}
cypher += common::stringFormat("CALL CREATE_FTS_INDEX('{}', '{}', [{}], stemmer := '{}', "
"stopWords := '{}');",
tableName, indexEntry.getIndexName(), std::move(propertyStr), config.stemmer,
stopWordsName);
return cypher;
}

catalog::TableCatalogEntry* FTSIndexAuxInfo::getTableEntriesToExport(
const main::ClientContext* context) const {
if (config.stopWordsTableName == FTSUtils::getDefaultStopWordsTableName()) {
return nullptr;
}
return context->getCatalog()->getTableCatalogEntry(context->getTransaction(),
config.stopWordsTableName);
}

} // namespace fts_extension
} // namespace kuzu
3 changes: 3 additions & 0 deletions extension/fts/src/include/catalog/fts_index_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ struct FTSIndexAuxInfo final : catalog::IndexAuxInfo {
}

std::string toCypher(const catalog::IndexCatalogEntry& indexEntry,
const main::ClientContext* context, std::string exportPat) const override;

catalog::TableCatalogEntry* getTableEntriesToExport(
const main::ClientContext* context) const override;
};

Expand Down
22 changes: 11 additions & 11 deletions extension/fts/test/test_files/fts_small.test
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,16 @@ Binder exception: Table: 0_docIdx4_appears_in already exists. Please drop or ren
---- ok
-STATEMENT CALL SHOW_INDEXES() RETURN *
---- 2
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english');
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english', stopWords := 'default');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english', stopWords := 'default');
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL CREATE_HNSW_INDEX('e_hnsw_index', 'embeddings', 'vec', distFunc := 'l2');
---- ok
-STATEMENT CALL SHOW_INDEXES() RETURN *
---- 3
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english');
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english', stopWords := 'default');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english', stopWords := 'default');
embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_HNSW_INDEX('e_hnsw_index', 'embeddings', 'vec', mu := 30, ml := 60, pu := 0.050000, distFunc := 'l2', alpha := 1.100000, efc := 200);
-RELOADDB
-STATEMENT CALL SHOW_INDEXES() RETURN *
Expand All @@ -325,15 +325,15 @@ embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_HNSW_INDEX('e_hnsw_index', '
---- ok
-STATEMENT CALL SHOW_INDEXES() RETURN *
---- 3
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english');
doc|docIdx1|FTS|[content]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['content'], stemmer := 'english', stopWords := 'default');
doc|docIdx|FTS|[content,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['content', 'author', 'name'], stemmer := 'english', stopWords := 'default');
embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_HNSW_INDEX('e_hnsw_index', 'embeddings', 'vec', mu := 30, ml := 60, pu := 0.050000, distFunc := 'l2', alpha := 1.100000, efc := 200);
-STATEMENT ALTER TABLE doc RENAME content to detail
---- ok
-STATEMENT CALL SHOW_INDEXES() RETURN *
---- 3
doc|docIdx1|FTS|[detail]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['detail'], stemmer := 'english');
doc|docIdx|FTS|[detail,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['detail', 'author', 'name'], stemmer := 'english');
doc|docIdx1|FTS|[detail]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx1', ['detail'], stemmer := 'english', stopWords := 'default');
doc|docIdx|FTS|[detail,author,name]|True|CALL CREATE_FTS_INDEX('doc', 'docIdx', ['detail', 'author', 'name'], stemmer := 'english', stopWords := 'default');
embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_HNSW_INDEX('e_hnsw_index', 'embeddings', 'vec', mu := 30, ml := 60, pu := 0.050000, distFunc := 'l2', alpha := 1.100000, efc := 200);
-STATEMENT CALL QUERY_FTS_INDEX('doc', 'docIdx', 'Alice') RETURN node.ID, score
---- 2
Expand All @@ -345,17 +345,17 @@ embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_HNSW_INDEX('e_hnsw_index', '
---- ok
-STATEMENT CALL SHOW_INDEXES() WHERE `table name` = 'student' RETURN *
---- 1
student|studentIdx|FTS|[name]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['name'], stemmer := 'english');
student|studentIdx|FTS|[name]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['name'], stemmer := 'english', stopWords := 'default');
-STATEMENT ALTER TABLE student drop age
---- ok
-STATEMENT CALL SHOW_INDEXES() WHERE `table name` = 'student' RETURN *
---- 1
student|studentIdx|FTS|[name]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['name'], stemmer := 'english');
student|studentIdx|FTS|[name]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['name'], stemmer := 'english', stopWords := 'default');
-STATEMENT ALTER TABLE student rename name to firstName
---- ok
-STATEMENT CALL SHOW_INDEXES() WHERE `table name` = 'student' RETURN *
---- 1
student|studentIdx|FTS|[firstName]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['firstName'], stemmer := 'english');
student|studentIdx|FTS|[firstName]|True|CALL CREATE_FTS_INDEX('student', 'studentIdx', ['firstName'], stemmer := 'english', stopWords := 'default');

-CASE FTSWithPortDBUnloadedExtension
-SKIP_IN_MEM
Expand Down
1 change: 1 addition & 0 deletions extension/fts/test/test_files/stopwords.test
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ alice|0.457137
-STATEMENT EXPORT DATABASE '${KUZU_EXPORT_DB_DIRECTORY}_fts/stopwords_export_test'
---- ok
-RELOADDB
-IMPORT_DATABASE "${KUZU_EXPORT_DB_DIRECTORY}_fts/stopwords_export_test"
-STATEMENT IMPORT DATABASE '${KUZU_EXPORT_DB_DIRECTORY}_fts/stopwords_export_test'
---- ok
-INSERT_STATEMENT_BLOCK VALIDATE_CITY_STOPWORDS_IDX
Expand Down
20 changes: 16 additions & 4 deletions src/binder/bind/bind_export_database.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "binder/bound_export_database.h"
#include "binder/query/bound_regular_query.h"
#include "catalog/catalog.h"
#include "catalog/catalog_entry/index_catalog_entry.h"
#include "catalog/catalog_entry/node_table_catalog_entry.h"
#include "catalog/catalog_entry/rel_table_catalog_entry.h"
#include "common/exception/binder.h"
Expand All @@ -22,14 +23,24 @@ namespace kuzu {
namespace binder {

static std::vector<ExportedTableData> getExportInfo(const Catalog& catalog,
const Transaction* transaction, Binder* binder) {
main::ClientContext* context, Binder* binder) {
auto transaction = context->getTransaction();
std::vector<ExportedTableData> exportData;
for (auto tableEntry : catalog.getTableEntries(transaction)) {
ExportedTableData tableData;
ExportedTableData tableData{ExportedTableType::USER_TABLE};
if (binder->bindExportTableData(tableData, *tableEntry, catalog, transaction)) {
exportData.push_back(std::move(tableData));
}
}
for (auto indexEntry : catalog.getIndexEntries(transaction)) {
ExportedTableData tableData{ExportedTableType::INTERNAL_TABLE};
auto tableToExport = indexEntry->getTableEntryToExport(context);
if (tableToExport == nullptr) {
continue;
}
binder->bindExportTableData(tableData, *tableToExport, catalog, transaction);

Check warning on line 41 in src/binder/bind/bind_export_database.cpp

View check run for this annotation

Codecov / codecov/patch

src/binder/bind/bind_export_database.cpp#L41

Added line #L41 was not covered by tests
exportData.push_back(std::move(tableData));
}
return exportData;
}

Expand Down Expand Up @@ -89,7 +100,9 @@ bool Binder::bindExportTableData(ExportedTableData& tableData, const TableCatalo
auto parsedStatement = Parser::parseQuery(exportQuery);
KU_ASSERT(parsedStatement.size() == 1);
auto parsedQuery = parsedStatement[0]->constPtrCast<RegularQuery>();
clientContext->setToUseInternalCatalogEntry();
auto query = bindQuery(*parsedQuery);
clientContext->setNotToUseInternalCatalogEntry();
auto columns = query->getStatementResult()->getColumns();
for (auto& column : columns) {
auto columnName = column->hasAlias() ? column->getAlias() : column->toString();
Expand All @@ -104,8 +117,7 @@ std::unique_ptr<BoundStatement> Binder::bindExportDatabaseClause(const Statement
auto& exportDB = statement.constCast<ExportDB>();
auto boundFilePath =
clientContext->getVFSUnsafe()->expandPath(clientContext, exportDB.getFilePath());
auto exportData =
getExportInfo(*clientContext->getCatalog(), clientContext->getTransaction(), this);
auto exportData = getExportInfo(*clientContext->getCatalog(), clientContext, this);
auto parsedOptions = bindParsingOptions(exportDB.getParsingOptionsRef());
auto fileTypeInfo = getFileType(parsedOptions);
switch (fileTypeInfo.fileType) {
Expand Down
2 changes: 1 addition & 1 deletion src/catalog/catalog_entry/hnsw_index_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ std::unique_ptr<HNSWIndexAuxInfo> HNSWIndexAuxInfo::deserialize(
}

std::string HNSWIndexAuxInfo::toCypher(const IndexCatalogEntry& indexEntry,
const main::ClientContext* context) const {
const main::ClientContext* context, std::string /* exportPath */) const {
std::string cypher;
auto catalog = context->getCatalog();
auto tableEntry =
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/catalog_entry/node_table_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ std::unique_ptr<NodeTableCatalogEntry> NodeTableCatalogEntry::deserialize(
return nodeTableEntry;
}

std::string NodeTableCatalogEntry::toCypher(main::ClientContext* /*clientContext*/) const {
std::string NodeTableCatalogEntry::toCypher(main::ClientContext* /*clientContext*/,
std::string /* exportPath */) const {
return common::stringFormat("CREATE NODE TABLE `{}` ({} PRIMARY KEY({}));", getName(),
propertyCollection.toCypher(), primaryKeyName);
}
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/catalog_entry/rel_group_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ static std::string getFromToStr(table_id_t tableID, Catalog* catalog,
return stringFormat("FROM {} TO {}", srcTableName, dstTableName);
}

std::string RelGroupCatalogEntry::toCypher(ClientContext* context) const {
std::string RelGroupCatalogEntry::toCypher(ClientContext* context,
std::string /* exportPath */) const {
auto catalog = context->getCatalog();
auto transaction = context->getTransaction();
std::stringstream ss;
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/catalog_entry/rel_table_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ std::string RelTableCatalogEntry::getMultiplicityStr() const {
RelMultiplicityUtils::toString(dstMultiplicity);
}

std::string RelTableCatalogEntry::toCypher(main::ClientContext* clientContext) const {
std::string RelTableCatalogEntry::toCypher(main::ClientContext* clientContext,
std::string /* exportPath */) const {
std::stringstream ss;
auto catalog = clientContext->getCatalog();
auto transaction = clientContext->getTransaction();
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ std::unique_ptr<ScalarMacroCatalogEntry> ScalarMacroCatalogEntry::deserialize(
return scalarMacroCatalogEntry;
}

std::string ScalarMacroCatalogEntry::toCypher(main::ClientContext* /*clientContext*/) const {
std::string ScalarMacroCatalogEntry::toCypher(main::ClientContext* /*clientContext*/,

Check warning on line 24 in src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp

View check run for this annotation

Codecov / codecov/patch

src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp#L24

Added line #L24 was not covered by tests
std::string /* exportPath */) const {
return macroFunction->toCypher(getName());
}

Expand Down
3 changes: 2 additions & 1 deletion src/catalog/catalog_entry/sequence_catalog_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ std::unique_ptr<SequenceCatalogEntry> SequenceCatalogEntry::deserialize(
return result;
}

std::string SequenceCatalogEntry::toCypher(main::ClientContext* /*clientContext*/) const {
std::string SequenceCatalogEntry::toCypher(main::ClientContext* /*clientContext*/,
std::string /* exportPath */) const {
return stringFormat("DROP SEQUENCE IF EXISTS `{}`;\n"
"CREATE SEQUENCE IF NOT EXISTS `{}` START {} INCREMENT {} MINVALUE {} "
"MAXVALUE {} {} CYCLE;\n"
Expand Down
2 changes: 1 addition & 1 deletion src/function/table/show_indexes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static std::unique_ptr<TableFuncBindData> bindFunc(const main::ClientContext* co
std::string indexDefinition;
if (dependencyLoaded) {
auto& auxInfo = indexEntry->getAuxInfo();
indexDefinition = auxInfo.toCypher(*indexEntry, context);
indexDefinition = auxInfo.toCypher(*indexEntry, context, "" /* exportPath */);
}
indexesInfo.emplace_back(std::move(tableName), std::move(indexName), std::move(indexType),
std::move(propertyNames), dependencyLoaded, std::move(indexDefinition));
Expand Down
5 changes: 5 additions & 0 deletions src/include/binder/bound_export_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
namespace kuzu {
namespace binder {

enum class ExportedTableType : uint8_t { USER_TABLE = 0, INTERNAL_TABLE = 1 };

struct ExportedTableData {
ExportedTableType exportedTableType;
std::string tableName;
std::unique_ptr<BoundRegularQuery> regularQuery;
std::vector<std::string> columnNames;
std::vector<common::LogicalType> columnTypes;

explicit ExportedTableData(ExportedTableType exportedTableType)
: exportedTableType{exportedTableType} {}
const std::vector<common::LogicalType>& getColumnTypesRef() const { return columnTypes; }
const BoundRegularQuery* getRegularQuery() const { return regularQuery.get(); }
};
Expand Down
5 changes: 4 additions & 1 deletion src/include/catalog/catalog_entry/catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ class KUZU_API CatalogEntry {
virtual void serialize(common::Serializer& serializer) const;
static std::unique_ptr<CatalogEntry> deserialize(common::Deserializer& deserializer);

virtual std::string toCypher(main::ClientContext* /*clientContext*/) const { KU_UNREACHABLE; }
virtual std::string toCypher(main::ClientContext* /*clientContext*/,

Check warning on line 69 in src/include/catalog/catalog_entry/catalog_entry.h

View check run for this annotation

Codecov / codecov/patch

src/include/catalog/catalog_entry/catalog_entry.h#L69

Added line #L69 was not covered by tests
std::string /*exportPath*/) const {
KU_UNREACHABLE;

Check warning on line 71 in src/include/catalog/catalog_entry/catalog_entry.h

View check run for this annotation

Codecov / codecov/patch

src/include/catalog/catalog_entry/catalog_entry.h#L71

Added line #L71 was not covered by tests
}

template<class TARGET>
TARGET& cast() {
Expand Down
5 changes: 4 additions & 1 deletion src/include/catalog/catalog_entry/dummy_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class DummyCatalogEntry final : public CatalogEntry {
}

void serialize(common::Serializer& /*serializer*/) const override { KU_UNREACHABLE; }
std::string toCypher(main::ClientContext* /*clientContext*/) const override { KU_UNREACHABLE; }
std::string toCypher(main::ClientContext* /*clientContext*/,

Check warning on line 18 in src/include/catalog/catalog_entry/dummy_catalog_entry.h

View check run for this annotation

Codecov / codecov/patch

src/include/catalog/catalog_entry/dummy_catalog_entry.h#L18

Added line #L18 was not covered by tests
std::string /* exportPath */) const override {
KU_UNREACHABLE;

Check warning on line 20 in src/include/catalog/catalog_entry/dummy_catalog_entry.h

View check run for this annotation

Codecov / codecov/patch

src/include/catalog/catalog_entry/dummy_catalog_entry.h#L20

Added line #L20 was not covered by tests
}
};

} // namespace catalog
Expand Down
7 changes: 4 additions & 3 deletions src/include/catalog/catalog_entry/hnsw_index_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ struct HNSWIndexAuxInfo final : IndexAuxInfo {
return std::make_unique<HNSWIndexAuxInfo>(*this);
}

std::string toCypher(const IndexCatalogEntry& indexEntry,
const main::ClientContext* context) const override;
std::string toCypher(const IndexCatalogEntry& indexEntry, const main::ClientContext* context,
std::string /* exportPath */) const override;
};

struct HNSWIndexCatalogEntry {
static constexpr char TYPE_NAME[] = "HNSW";

static std::string toCypher(const IndexCatalogEntry& indexEntry, main::ClientContext* context);
static std::string toCypher(const IndexCatalogEntry& indexEntry, main::ClientContext* context,
std::string /* exportPath */);
};

} // namespace catalog
Expand Down
16 changes: 13 additions & 3 deletions src/include/catalog/catalog_entry/index_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "catalog_entry.h"
#include "common/serializer/buffered_reader.h"
#include "common/serializer/deserializer.h"
#include "table_catalog_entry.h"

namespace kuzu::common {
struct BufferReader;
Expand Down Expand Up @@ -30,7 +31,12 @@ struct KUZU_API IndexAuxInfo {
}

virtual std::string toCypher(const IndexCatalogEntry& indexEntry,
const main::ClientContext* context) const = 0;
const main::ClientContext* context, std::string exportPath) const = 0;

virtual TableCatalogEntry* getTableEntriesToExport(
const main::ClientContext* /*context*/) const {
return nullptr;
}
};

class KUZU_API IndexCatalogEntry final : public CatalogEntry {
Expand Down Expand Up @@ -63,8 +69,8 @@ class KUZU_API IndexCatalogEntry final : public CatalogEntry {
// using the auxBuffer.
static std::unique_ptr<IndexCatalogEntry> deserialize(common::Deserializer& deserializer);

std::string toCypher(main::ClientContext* context) const override {
return isLoaded() ? auxInfo->toCypher(*this, context) : "";
std::string toCypher(main::ClientContext* context, std::string exportPath) const override {
return isLoaded() ? auxInfo->toCypher(*this, context, exportPath) : "";
}
std::unique_ptr<IndexCatalogEntry> copy() const {
return std::make_unique<IndexCatalogEntry>(type, tableID, indexName, propertyIDs,
Expand All @@ -80,6 +86,10 @@ class KUZU_API IndexCatalogEntry final : public CatalogEntry {

bool isLoaded() const { return auxBuffer == nullptr; }

TableCatalogEntry* getTableEntryToExport(main::ClientContext* context) {
return isLoaded() ? auxInfo->getTableEntriesToExport(context) : nullptr;
}

protected:
std::string type;
common::table_id_t tableID = common::INVALID_TABLE_ID;
Expand Down
3 changes: 2 additions & 1 deletion src/include/catalog/catalog_entry/node_table_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class KUZU_API NodeTableCatalogEntry final : public TableCatalogEntry {
static std::unique_ptr<NodeTableCatalogEntry> deserialize(common::Deserializer& deserializer);

std::unique_ptr<TableCatalogEntry> copy() const override;
std::string toCypher(main::ClientContext* /*clientContext*/) const override;
std::string toCypher(main::ClientContext* /*clientContext*/,
std::string /* exportPath */) const override;

private:
std::unique_ptr<binder::BoundExtraCreateCatalogEntryInfo> getBoundExtraCreateInfo(
Expand Down
3 changes: 2 additions & 1 deletion src/include/catalog/catalog_entry/rel_group_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class RelGroupCatalogEntry final : public CatalogEntry {
//===--------------------------------------------------------------------===//
void serialize(common::Serializer& serializer) const override;
static std::unique_ptr<RelGroupCatalogEntry> deserialize(common::Deserializer& deserializer);
std::string toCypher(main::ClientContext* clientContext) const override;
std::string toCypher(main::ClientContext* clientContext,
std::string /* exportPath */) const override;

binder::BoundCreateTableInfo getBoundCreateTableInfo(transaction::Transaction* transaction,
const Catalog* catalog, bool isInternal) const;
Expand Down
3 changes: 2 additions & 1 deletion src/include/catalog/catalog_entry/rel_table_catalog_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class RelTableCatalogEntry final : public TableCatalogEntry {
std::unique_ptr<TableCatalogEntry> copy() const override;

std::string getMultiplicityStr() const;
std::string toCypher(main::ClientContext* clientContext) const override;
std::string toCypher(main::ClientContext* clientContext,
std::string /* exportPath */) const override;

private:
std::unique_ptr<binder::BoundExtraCreateCatalogEntryInfo> getBoundExtraCreateInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class ScalarMacroCatalogEntry final : public CatalogEntry {
//===--------------------------------------------------------------------===//
void serialize(common::Serializer& serializer) const override;
static std::unique_ptr<ScalarMacroCatalogEntry> deserialize(common::Deserializer& deserializer);
std::string toCypher(main::ClientContext* clientContext) const override;
std::string toCypher(main::ClientContext* clientContext,
std::string /* exportPath */) const override;

private:
std::unique_ptr<function::ScalarMacroFunction> macroFunction;
Expand Down
Loading

0 comments on commit e0fa139

Please sign in to comment.