This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new bc4f722b ci: fix snowflake integration tests (#1187)
bc4f722b is described below
commit bc4f722bdc9112945add49c60bdc3426f2a7ed67
Author: Matt Topol <[email protected]>
AuthorDate: Wed Oct 11 08:33:41 2023 -0400
ci: fix snowflake integration tests (#1187)
We use quotes around the table name in the `DropTable` method but we
don't use it in `CreateSampleTable`. Without the quotes, the table is
created as upper case, but we attempt to drop the table with a forced
lower case name. As a result the table doesn't get dropped and we fail
on the table creation because the table already exists.
So if we properly put quotes around the table creation, this should fix
the snowflake CI integration tests.
---
c/driver/snowflake/snowflake_test.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/c/driver/snowflake/snowflake_test.cc
b/c/driver/snowflake/snowflake_test.cc
index 2a9f692c..cdd92e2c 100644
--- a/c/driver/snowflake/snowflake_test.cc
+++ b/c/driver/snowflake/snowflake_test.cc
@@ -71,15 +71,15 @@ class SnowflakeQuirks : public
adbc_validation::DriverQuirks {
adbc_validation::Handle<struct AdbcStatement> statement;
CHECK_OK(AdbcStatementNew(connection, &statement.value, error));
- std::string create = "CREATE TABLE ";
+ std::string create = "CREATE TABLE \"";
create += name;
- create += " (int64s INT, strings TEXT)";
+ create += "\" (int64s INT, strings TEXT)";
CHECK_OK(AdbcStatementSetSqlQuery(&statement.value, create.c_str(),
error));
CHECK_OK(AdbcStatementExecuteQuery(&statement.value, nullptr, nullptr,
error));
- std::string insert = "INSERT INTO ";
+ std::string insert = "INSERT INTO \"";
insert += name;
- insert += " VALUES (42, 'foo'), (-42, NULL), (NULL, '')";
+ insert += "\" VALUES (42, 'foo'), (-42, NULL), (NULL, '')";
CHECK_OK(AdbcStatementSetSqlQuery(&statement.value, insert.c_str(),
error));
CHECK_OK(AdbcStatementExecuteQuery(&statement.value, nullptr, nullptr,
error));