Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(c): Fix linker error with SQLite tests (#2260)
Noticed this when compiled via meson: ```base $ meson setup builddir -Dtests=true -Dsqlite=true $ meson compile -C builddir ... /usr/bin/ld: driver/sqlite/adbc-driver-sqlite-test.p/sqlite_test.cc.o: in function `SqliteStatementTest_SqlIngestUInt64_Test::TestBody()': sqlite_test.cc:(.text+0x802): undefined reference to `void adbc_validation::StatementTest::TestSqlIngestType<unsigned long>(ArrowType, std::vector<std::optional<unsigned long>, std::allocator<std::optional<unsigned long> > > const&, bool)' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ``` I'm not sure why the CMake config is OK with this, likely some magic I don't understand. However, it makes sense to me that the linker is complaining; the adbc_validation.h header declares this template but the definition is tucked away in adbc_validation_statement.cc. So I don't think the TU for sqlite_test.cc would have access to that (?) without moving the definition to the header. Alternatively we could provide an explicit template instantiation for the type (uint64_t) in adbc_validation_statement.cc, though I don't think that is inline with the intent of this class
- Loading branch information