MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / TEST_F

Function TEST_F

test/api/arrow_test.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57TEST_F(ArrowTest, resultToArrow) {
58 auto query = "MATCH (a:person) WHERE a.fName = 'Bob' RETURN a.fName";
59 auto result = conn->query(query);
60 auto arrowArray = result->getNextArrowChunk(1);
61 ASSERT_EQ(arrowArray->length, 1);
62 ASSERT_EQ(arrowArray->null_count, 0);
63 ASSERT_EQ(arrowArray->n_children, 1);
64 // FIXME: Not sure where the length of the string is stored
65 ASSERT_EQ(std::string((const char*)arrowArray->children[0]->buffers[2], 3), "Bob");
66 ASSERT_FALSE(result->hasNextArrowChunk());
67 arrowArray->release(arrowArray.get());
68}
69
70TEST_F(ArrowTest, queryAsArrow) {
71 auto query = "MATCH (a:person) WHERE a.fName = 'Bob' RETURN a.fName";

Callers

nothing calls this directly

Calls 15

releaseMethod · 0.80
queryAsArrowMethod · 0.80
whatMethod · 0.80
getArrowSchemaMethod · 0.80
emplace_backMethod · 0.80
hasCSRMetadataMethod · 0.80
getArrowChunksMethod · 0.80
getCSRArrowArraysMethod · 0.80
releaseCSRArrowArrayFunction · 0.70
queryMethod · 0.45
getNextArrowChunkMethod · 0.45
hasNextArrowChunkMethod · 0.45

Tested by

no test coverage detected