Skip to content

Commit 3ced480

Browse files
committed
Fix add-function
1 parent 63e3b8d commit 3ced480

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src_cpp/py_database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PyDatabase::PyDatabase(const std::string& databasePath, uint64_t bufferPoolSize,
3535
uint64_t maxNumThreads, bool compression, bool readOnly) {
3636
auto systemConfig = SystemConfig(bufferPoolSize, maxNumThreads, compression, readOnly);
3737
database = std::make_unique<Database>(databasePath, systemConfig);
38-
database->addFunction(READ_PANDAS_FUNC_NAME,kuzu::PandasScanFunction::getFunctionSet());
38+
database->addBuiltInFunction(READ_PANDAS_FUNC_NAME, kuzu::PandasScanFunction::getFunctionSet());
3939
storageDriver = std::make_unique<kuzu::main::StorageDriver>(database.get());
4040
}
4141

test/test_scan_pandas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def test_scan_pandas_with_filter(get_tmp_path):
6262
'weight': np.array([23.2, 31.7, 42.9], dtype=np.float64)
6363
}
6464
df = pd.DataFrame(data)
65+
# Dummy query to ensure the READ_PANDAS function is persistent after a write transaction.
66+
conn.execute("CREATE NODE TABLE PERSON1(ID INT64, PRIMARY KEY(ID))")
6567
results = conn.execute("CALL READ_PANDAS('df') WHERE id > 20 RETURN id + 5, weight")
6668
assert results.get_next() == [27, 23.2]
6769
assert results.get_next() == [105, 42.9]

0 commit comments

Comments
 (0)