Skip to content

Commit

Permalink
Revert BulkIngestWithAutocommit; just going to benchmark this instead…
Browse files Browse the repository at this point in the history
… after seeing TestSqlIngestType
  • Loading branch information
Solomon Choe committed Jul 20, 2023
1 parent 85755de commit f8e8165
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions c/driver/sqlite/sqlite_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <gtest/gtest.h>
#include <nanoarrow/nanoarrow.h>

#include "types.h"
#include "statement_reader.h"
#include "validation/adbc_validation.h"
#include "validation/adbc_validation_util.h"
Expand Down Expand Up @@ -640,45 +639,6 @@ TEST_F(SqliteReaderTest, MultiValueParams) {
ASSERT_EQ(nullptr, reader.array->release);
}

TEST_F(SqliteReaderTest, BulkIngestWithAutocommit) {
adbc_validation::StreamReader reader;
ASSERT_NO_FATAL_FAILURE(Exec("CREATE TABLE foo (col)"));

// Filling out SqliteStatement explicitly to include `target_table`, which will
// make SqliteStatementExecuteQuery call SqliteStatementExecuteIngest
struct SqliteStatement sqlite_stmt;
std::memset(&sqlite_stmt, 0, sizeof(sqlite_stmt));

struct AdbcSqliteBinder binder;
std::memset(&binder, 0, sizeof(binder));
sqlite_stmt.binder = binder;

sqlite_stmt.conn = db;
sqlite_stmt.prepared = 0;
sqlite_stmt.append = 1;
sqlite_stmt.batch_size = 4;

sqlite_stmt.target_table = strdup("foo");

struct AdbcStatement statement;
std::memset(&statement, 0, sizeof(statement));

struct AdbcConnection connection;
std::memset(&connection, 0, sizeof(connection));
connection.private_data = db;

AdbcStatusCode status = AdbcStatementNew(&connection, &statement, &error);
ASSERT_EQ(ADBC_STATUS_OK, status);
statement.private_data = &sqlite_stmt;

std::string query = "INSERT INTO foo VALUES (1), (2), (3), (4)";
status = AdbcStatementSetSqlQuery(&statement, query.c_str(), &error);
ASSERT_EQ(ADBC_STATUS_OK, status);

ASSERT_EQ(ADBC_STATUS_OK, AdbcStatementExecuteQuery(&statement, nullptr, nullptr, &error));
free(sqlite_stmt.target_table);
}

template <typename CType>
class SqliteNumericParamTest : public SqliteReaderTest,
public ::testing::WithParamInterface<ArrowType> {
Expand Down

0 comments on commit f8e8165

Please sign in to comment.