(raw_driver);
+ FILL_DEFAULT(driver, StatementExecuteSchema);
+
+ // Zero out the padding
+ std::memset(driver->reserved, 0, sizeof(driver->reserved));
+ }
return ADBC_STATUS_OK;
diff --git a/c/driver_manager/adbc_driver_manager_test.cc b/c/driver_manager/adbc_driver_manager_test.cc
index d3ff6f58e1..c59e753395 100644
--- a/c/driver_manager/adbc_driver_manager_test.cc
+++ b/c/driver_manager/adbc_driver_manager_test.cc
@@ -34,6 +34,8 @@ namespace adbc {
using adbc_validation::IsOkStatus;
using adbc_validation::IsStatus;
+TEST(Adbc, AdbcDriverSize) { ASSERT_EQ(sizeof(AdbcDriver), 96 * sizeof(void*)); }
+
class DriverManager : public ::testing::Test {
public:
void SetUp() override {
@@ -157,6 +159,38 @@ TEST_F(DriverManager, MultiDriverTest) {
error->release(&error.value);
}
+class AdbcVersion : public ::testing::Test {
+ public:
+ void SetUp() override {
+ std::memset(&driver, 0, sizeof(driver));
+ std::memset(&error, 0, sizeof(error));
+ }
+
+ void TearDown() override {
+ if (error.release) {
+ error.release(&error);
+ }
+
+ if (driver.release) {
+ ASSERT_THAT(driver.release(&driver, &error), IsOkStatus(&error));
+ ASSERT_EQ(driver.private_data, nullptr);
+ ASSERT_EQ(driver.private_manager, nullptr);
+ }
+ }
+
+ protected:
+ struct AdbcDriver driver = {};
+ struct AdbcError error = {};
+};
+
+// TODO: set up a dummy driver to test behavior more deterministically
+
+TEST_F(AdbcVersion, ForwardsCompatible) {
+ ASSERT_THAT(
+ AdbcLoadDriver("adbc_driver_sqlite", nullptr, ADBC_VERSION_1_1_0, &driver, &error),
+ IsOkStatus(&error));
+}
+
class SqliteQuirks : public adbc_validation::DriverQuirks {
public:
AdbcStatusCode SetupDatabase(struct AdbcDatabase* database,
diff --git a/go/adbc/adbc.go b/go/adbc/adbc.go
index 92df909b98..bc03d4283e 100644
--- a/go/adbc/adbc.go
+++ b/go/adbc/adbc.go
@@ -142,20 +142,35 @@ const (
StatusUnauthorized // Unauthorized
)
+const (
+ AdbcVersion1_0_0 int64 = 1_000_000
+ AdbcVersion1_1_0 int64 = 1_001_000
+)
+
// Canonical option values
const (
- OptionValueEnabled = "true"
- OptionValueDisabled = "false"
- OptionKeyAutoCommit = "adbc.connection.autocommit"
- OptionKeyIngestTargetTable = "adbc.ingest.target_table"
- OptionKeyIngestMode = "adbc.ingest.mode"
- OptionKeyIsolationLevel = "adbc.connection.transaction.isolation_level"
- OptionKeyReadOnly = "adbc.connection.readonly"
- OptionValueIngestModeCreate = "adbc.ingest.mode.create"
- OptionValueIngestModeAppend = "adbc.ingest.mode.append"
- OptionKeyURI = "uri"
- OptionKeyUsername = "username"
- OptionKeyPassword = "password"
+ OptionValueEnabled = "true"
+ OptionValueDisabled = "false"
+ OptionKeyAutoCommit = "adbc.connection.autocommit"
+ // The current catalog.
+ OptionKeyCurrentCatalog = "adbc.connection.catalog"
+ // The current schema.
+ OptionKeyCurrentDbSchema = "adbc.connection.db_schema"
+ // Make ExecutePartitions nonblocking.
+ OptionKeyIncremental = "adbc.statement.exec.incremental"
+ // Get the progress
+ OptionKeyProgress = "adbc.statement.exec.progress"
+ OptionKeyIngestTargetTable = "adbc.ingest.target_table"
+ OptionKeyIngestMode = "adbc.ingest.mode"
+ OptionKeyIsolationLevel = "adbc.connection.transaction.isolation_level"
+ OptionKeyReadOnly = "adbc.connection.readonly"
+ OptionValueIngestModeCreate = "adbc.ingest.mode.create"
+ OptionValueIngestModeAppend = "adbc.ingest.mode.append"
+ OptionValueIngestModeReplace = "adbc.ingest.mode.replace"
+ OptionValueIngestModeCreateAppend = "adbc.ingest.mode.create_append"
+ OptionKeyURI = "uri"
+ OptionKeyUsername = "username"
+ OptionKeyPassword = "password"
)
type OptionIsolationLevel string
@@ -170,6 +185,11 @@ const (
LevelLinearizable OptionIsolationLevel = "adbc.connection.transaction.isolation.linearizable"
)
+// Canonical property values
+const (
+ PropertyProgress = "adbc.statement.exec.progress"
+)
+
// Driver is the entry point for the interface. It is similar to
// database/sql.Driver taking a map of keys and values as options
// to initialize a Connection to the database. Any common connection
@@ -212,6 +232,8 @@ const (
InfoDriverVersion InfoCode = 101 // DriverVersion
// The driver Arrow library version (type: utf8)
InfoDriverArrowVersion InfoCode = 102 // DriverArrowVersion
+ // The driver ADBC API version (type: int64)
+ InfoDriverADBCVersion InfoCode = 103 // DriverADBCVersion
)
type ObjectDepth int
@@ -275,6 +297,10 @@ type Connection interface {
// codes are defined as constants. Codes [0, 10_000) are reserved
// for ADBC usage. Drivers/vendors will ignore requests for unrecognized
// codes (the row will be omitted from the result).
+ //
+ // Since ADBC 1.1.0: the range [500, 1_000) is reserved for "XDBC"
+ // information, which is the same metadata provided by the same info
+ // code range in the Arrow Flight SQL GetSqlInfo RPC.
GetInfo(ctx context.Context, infoCodes []InfoCode) (array.RecordReader, error)
// GetObjects gets a hierarchical view of all catalogs, database schemas,
@@ -470,6 +496,9 @@ type Statement interface {
// of rows affected if known, otherwise it will be -1.
//
// This invalidates any prior result sets on this statement.
+ //
+ // Since ADBC 1.1.0: releasing the returned RecordReader without
+ // consuming it fully is equivalent to calling AdbcStatementCancel.
ExecuteQuery(context.Context) (array.RecordReader, int64, error)
// ExecuteUpdate executes a statement that does not generate a result
@@ -534,5 +563,45 @@ type Statement interface {
//
// If the driver does not support partitioned results, this will return
// an error with a StatusNotImplemented code.
+ //
+ // When OptionKeyIncremental is set, this should be called
+ // repeatedly until receiving an empty Partitions.
ExecutePartitions(context.Context) (*arrow.Schema, Partitions, int64, error)
}
+
+// StatementCancel is a Statement that also supports Cancel.
+//
+// Since ADBC API revision 1.1.0.
+type StatementCancel interface {
+ // Cancel stops execution of an in-progress query.
+ //
+ // This can be called during ExecuteQuery (or similar), or while
+ // consuming a RecordReader returned from such. Calling this
+ // function should make the other functions return an error with a
+ // StatusCancelled code.
+ //
+ // This must always be thread-safe (other operations are not
+ // necessarily thread-safe).
+ Cancel() error
+}
+
+// StatementExecuteSchema is a Statement that also supports ExecuteSchema.
+//
+// Since ADBC API revision 1.1.0.
+type StatementExecuteSchema interface {
+ // ExecuteSchema gets the schema of the result set of a query without executing it.
+ ExecuteSchema(context.Context) (*arrow.Schema, error)
+}
+
+// GetSetOptions is a PostInitOptions that also supports getting and setting property values of different types.
+//
+// Since ADBC API revision 1.1.0.
+type GetSetOptions interface {
+ PostInitOptions
+
+ SetOption(key, value string) error
+ SetOptionInt(key, value int64) error
+ SetOptionDouble(key, value float64) error
+ GetOptionInt(key string) (int64, error)
+ GetOptionDouble(key string) (float64, error)
+}
diff --git a/go/adbc/infocode_string.go b/go/adbc/infocode_string.go
index 73af20c1e1..df0fd74b96 100644
--- a/go/adbc/infocode_string.go
+++ b/go/adbc/infocode_string.go
@@ -14,23 +14,24 @@ func _() {
_ = x[InfoDriverName-100]
_ = x[InfoDriverVersion-101]
_ = x[InfoDriverArrowVersion-102]
+ _ = x[InfoDriverADBCVersion-103]
}
const (
_InfoCode_name_0 = "VendorNameVendorVersionVendorArrowVersion"
- _InfoCode_name_1 = "DriverNameDriverVersionDriverArrowVersion"
+ _InfoCode_name_1 = "DriverNameDriverVersionDriverArrowVersionDriverADBCVersion"
)
var (
_InfoCode_index_0 = [...]uint8{0, 10, 23, 41}
- _InfoCode_index_1 = [...]uint8{0, 10, 23, 41}
+ _InfoCode_index_1 = [...]uint8{0, 10, 23, 41, 58}
)
func (i InfoCode) String() string {
switch {
case i <= 2:
return _InfoCode_name_0[_InfoCode_index_0[i]:_InfoCode_index_0[i+1]]
- case 100 <= i && i <= 102:
+ case 100 <= i && i <= 103:
i -= 100
return _InfoCode_name_1[_InfoCode_index_1[i]:_InfoCode_index_1[i+1]]
default:
diff --git a/go/adbc/pkg/_tmpl/driver.go.tmpl b/go/adbc/pkg/_tmpl/driver.go.tmpl
index 7432f001b9..eb7b6d14d6 100644
--- a/go/adbc/pkg/_tmpl/driver.go.tmpl
+++ b/go/adbc/pkg/_tmpl/driver.go.tmpl
@@ -915,7 +915,7 @@ func {{.Prefix}}DriverInit(version C.int, rawDriver *C.void, err *C.struct_AdbcE
}
driver := (*C.struct_AdbcDriver)(unsafe.Pointer(rawDriver))
- C.memset(unsafe.Pointer(driver), 0, C.sizeof_struct_AdbcDriver)
+ C.memset(unsafe.Pointer(driver), 0, C.ADBC_DRIVER_1_0_0_SIZE)
driver.DatabaseInit = (*[0]byte)(C.{{.Prefix}}DatabaseInit)
driver.DatabaseNew = (*[0]byte)(C.{{.Prefix}}DatabaseNew)
driver.DatabaseRelease = (*[0]byte)(C.{{.Prefix}}DatabaseRelease)
diff --git a/go/adbc/pkg/flightsql/driver.go b/go/adbc/pkg/flightsql/driver.go
index a8a606dd0b..cd90a557b4 100644
--- a/go/adbc/pkg/flightsql/driver.go
+++ b/go/adbc/pkg/flightsql/driver.go
@@ -919,7 +919,7 @@ func FlightSQLDriverInit(version C.int, rawDriver *C.void, err *C.struct_AdbcErr
}
driver := (*C.struct_AdbcDriver)(unsafe.Pointer(rawDriver))
- C.memset(unsafe.Pointer(driver), 0, C.sizeof_struct_AdbcDriver)
+ C.memset(unsafe.Pointer(driver), 0, C.ADBC_DRIVER_1_0_0_SIZE)
driver.DatabaseInit = (*[0]byte)(C.FlightSQLDatabaseInit)
driver.DatabaseNew = (*[0]byte)(C.FlightSQLDatabaseNew)
driver.DatabaseRelease = (*[0]byte)(C.FlightSQLDatabaseRelease)
diff --git a/go/adbc/pkg/snowflake/driver.go b/go/adbc/pkg/snowflake/driver.go
index 51b6ce5bc9..86ba525ed8 100644
--- a/go/adbc/pkg/snowflake/driver.go
+++ b/go/adbc/pkg/snowflake/driver.go
@@ -919,7 +919,7 @@ func SnowflakeDriverInit(version C.int, rawDriver *C.void, err *C.struct_AdbcErr
}
driver := (*C.struct_AdbcDriver)(unsafe.Pointer(rawDriver))
- C.memset(unsafe.Pointer(driver), 0, C.sizeof_struct_AdbcDriver)
+ C.memset(unsafe.Pointer(driver), 0, C.ADBC_DRIVER_1_0_0_SIZE)
driver.DatabaseInit = (*[0]byte)(C.SnowflakeDatabaseInit)
driver.DatabaseNew = (*[0]byte)(C.SnowflakeDatabaseNew)
driver.DatabaseRelease = (*[0]byte)(C.SnowflakeDatabaseRelease)
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcConnection.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcConnection.java
index fea705482a..d3c8119186 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcConnection.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcConnection.java
@@ -27,7 +27,7 @@
* Connections are not required to be thread-safe, but they can be used from multiple threads so
* long as clients take care to serialize accesses to a connection.
*/
-public interface AdbcConnection extends AutoCloseable {
+public interface AdbcConnection extends AutoCloseable, AdbcOptions {
/** Commit the pending transaction. */
default void commit() throws AdbcException {
throw AdbcException.notImplemented("Connection does not support transactions");
@@ -285,6 +285,42 @@ default void setAutoCommit(boolean enableAutoCommit) throws AdbcException {
throw AdbcException.notImplemented("Connection does not support transactions");
}
+ /**
+ * Get the current catalog.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default String getCurrentCatalog() throws AdbcException {
+ throw AdbcException.notImplemented("Connection does not support current catalog");
+ }
+
+ /**
+ * Set the current catalog.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default void setCurrentCatalog(String catalog) throws AdbcException {
+ throw AdbcException.notImplemented("Connection does not support current catalog");
+ }
+
+ /**
+ * Get the current schema.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default String getCurrentDbSchema() throws AdbcException {
+ throw AdbcException.notImplemented("Connection does not support current catalog");
+ }
+
+ /**
+ * Set the current schema.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default void setCurrentDbSchema(String catalog) throws AdbcException {
+ throw AdbcException.notImplemented("Connection does not support current catalog");
+ }
+
/**
* Get whether the connection is read-only.
*
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDatabase.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDatabase.java
index e63c598be9..723acfc0da 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDatabase.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDatabase.java
@@ -24,7 +24,7 @@
* remote/networked databases, for in-memory databases, this object provides an explicit point of
* ownership.
*/
-public interface AdbcDatabase extends AutoCloseable {
+public interface AdbcDatabase extends AutoCloseable, AdbcOptions {
/** Create a new connection to the database. */
AdbcConnection connect() throws AdbcException;
}
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDriver.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDriver.java
index 80abd18560..9386b88089 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDriver.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcDriver.java
@@ -21,11 +21,42 @@
/** A handle to an ADBC database driver. */
public interface AdbcDriver {
- /** The standard parameter name for a connection URL (type String). */
- String PARAM_URL = "adbc.url";
+ /**
+ * The standard parameter name for a password (type String).
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ AdbcOptionKey PARAM_PASSWORD = new AdbcOptionKey<>("password", String.class);
+
+ /**
+ * The standard parameter name for a connection URI (type String).
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ AdbcOptionKey PARAM_URI = new AdbcOptionKey<>("uri", String.class);
+
+ /**
+ * The standard parameter name for a connection URL (type String).
+ *
+ * @deprecated Prefer {@link #PARAM_URI} instead.
+ */
+ @Deprecated String PARAM_URL = "adbc.url";
+
+ /**
+ * The standard parameter name for a username (type String).
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ AdbcOptionKey PARAM_USERNAME = new AdbcOptionKey<>("username", String.class);
+
/** The standard parameter name for SQL quirks configuration (type SqlQuirks). */
String PARAM_SQL_QUIRKS = "adbc.sql.quirks";
+ /** ADBC API revision 1.0.0. */
+ long ADBC_VERSION_1_0_0 = 1_000_000;
+ /** ADBC API revision 1.1.0. */
+ long ADBC_VERSION_1_1_0 = 1_001_000;
+
/**
* Open a database via this driver.
*
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcInfoCode.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcInfoCode.java
index 52c0956564..8d5c73ba9f 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcInfoCode.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcInfoCode.java
@@ -16,7 +16,12 @@
*/
package org.apache.arrow.adbc.core;
-/** Integer IDs used for requesting information about the database/driver. */
+/**
+ * Integer IDs used for requesting information about the database/driver.
+ *
+ * Since ADBC 1.1.0: the range [500, 1_000) is reserved for "XDBC" information, which is the same
+ * metadata provided by the same info code range in the Arrow Flight SQL GetSqlInfo RPC.
+ */
public enum AdbcInfoCode {
/** The database vendor/product name (e.g. the server name) (type: utf8). */
VENDOR_NAME(0),
@@ -31,6 +36,16 @@ public enum AdbcInfoCode {
DRIVER_VERSION(101),
/** The driver Arrow library version (type: utf8). */
DRIVER_ARROW_VERSION(102),
+ /**
+ * The ADBC API version (type: int64).
+ *
+ *
The value should be one of the ADBC_VERSION constants.
+ *
+ * @see AdbcDriver#ADBC_VERSION_1_0_0
+ * @see AdbcDriver#ADBC_VERSION_1_1_0
+ * @since ADBC API revision 1.1.0
+ */
+ DRIVER_ADBC_VERSION(103),
;
private final int value;
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptionKey.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptionKey.java
new file mode 100644
index 0000000000..d594703688
--- /dev/null
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptionKey.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.arrow.adbc.core;
+
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * A typesafe option key.
+ *
+ * @since ADBC API revision 1.1.0
+ * @param The option value type.
+ */
+public final class AdbcOptionKey {
+ private final String key;
+ private final Class type;
+
+ public AdbcOptionKey(String key, Class type) {
+ this.key = Objects.requireNonNull(key);
+ this.type = Objects.requireNonNull(type);
+ }
+
+ /**
+ * Set this option in an options map (like for {@link AdbcDriver#open(Map)}.
+ *
+ * @param options The options.
+ * @param value The option value.
+ */
+ public void set(Map options, T value) {
+ options.put(key, value);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdbcOptionKey> that = (AdbcOptionKey>) o;
+ return Objects.equals(key, that.key) && Objects.equals(type, that.type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(key, type);
+ }
+
+ @Override
+ public String toString() {
+ return "AdbcOptionKey{" + key + ", " + type + '}';
+ }
+}
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptions.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptions.java
new file mode 100644
index 0000000000..efd8eab77b
--- /dev/null
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcOptions.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.arrow.adbc.core;
+
+/** An ADBC object that supports getting/setting generic options. */
+public interface AdbcOptions {
+ /**
+ * Get a generic option.
+ *
+ * @since ADBC API revision 1.1.0
+ * @param key The option to retrieve.
+ * @return The option value.
+ * @param The option value type.
+ */
+ default T getOption(AdbcOptionKey key) throws AdbcException {
+ throw AdbcException.notImplemented("Unsupported option " + key);
+ }
+
+ /**
+ * Set a generic option.
+ *
+ * @since ADBC API revision 1.1.0
+ * @param key The option to set.
+ * @param value The option value.
+ * @param The option value type.
+ */
+ default void setOption(AdbcOptionKey key, T value) throws AdbcException {
+ throw AdbcException.notImplemented("Unsupported option " + key);
+ }
+}
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcStatement.java b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcStatement.java
index ef2be487e2..a033726b9a 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcStatement.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/AdbcStatement.java
@@ -19,6 +19,7 @@
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.util.Iterator;
import java.util.List;
import org.apache.arrow.vector.VectorSchemaRoot;
import org.apache.arrow.vector.ipc.ArrowReader;
@@ -40,8 +41,23 @@
* Statements are not required to be thread-safe, but they can be used from multiple threads so
* long as clients take care to serialize accesses to a statement.
*/
-public interface AdbcStatement extends AutoCloseable {
- /** Set a generic query option. */
+public interface AdbcStatement extends AutoCloseable, AdbcOptions {
+ /**
+ * Cancel execution of a query.
+ *
+ *
This method must be thread-safe (other method are not necessarily thread-safe).
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default void cancel() throws AdbcException {
+ throw AdbcException.notImplemented("Statement does not support cancel");
+ }
+
+ /**
+ * Set a generic query option.
+ *
+ * @deprecated Prefer {@link #setOption(AdbcOptionKey, Object)}.
+ */
default void setOption(String key, Object value) throws AdbcException {
throw AdbcException.notImplemented("Unsupported option " + key);
}
@@ -94,6 +110,37 @@ default PartitionResult executePartitioned() throws AdbcException {
throw AdbcException.notImplemented("Statement does not support executePartitioned");
}
+ /**
+ * Get the schema of the result set without executing the query.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default Schema executeSchema() throws AdbcException {
+ throw AdbcException.notImplemented("Statement does not support executeSchema");
+ }
+
+ /**
+ * Execute a result set-generating query and get a list of partitions of the result set.
+ *
+ *
These can be serialized and deserialized for parallel and/or distributed fetching.
+ *
+ *
This may invalidate any prior result sets.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default Iterator pollPartitioned() throws AdbcException {
+ throw AdbcException.notImplemented("Statement does not support pollPartitioned");
+ }
+
+ /**
+ * Get the progress of executing a query.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ default double getProgress() throws AdbcException {
+ throw AdbcException.notImplemented("Statement does not support getProgress");
+ }
+
/**
* Get the schema for bound parameters.
*
diff --git a/java/core/src/main/java/org/apache/arrow/adbc/core/BulkIngestMode.java b/java/core/src/main/java/org/apache/arrow/adbc/core/BulkIngestMode.java
index 2ab16ac428..e23e8de4ac 100644
--- a/java/core/src/main/java/org/apache/arrow/adbc/core/BulkIngestMode.java
+++ b/java/core/src/main/java/org/apache/arrow/adbc/core/BulkIngestMode.java
@@ -24,7 +24,20 @@ public enum BulkIngestMode {
/**
* Do not create the table and append data; error if the table does not exist ({@link
* AdbcStatusCode#NOT_FOUND}) or does not match the schema of the data to append ({@link
- * AdbcStatusCode#ALREADY_EXISTS}). *
+ * AdbcStatusCode#ALREADY_EXISTS}).
*/
APPEND,
+ /**
+ * Create the table and insert data; drop the original table if it already exists.
+ *
+ * @since ADBC API revision 1.1.0
+ */
+ REPLACE,
+ /**
+ * Insert data; create the table if it does not exist, or error ({@link
+ * AdbcStatusCode#ALREADY_EXISTS}) if the table exists, but the schema does not match the schema
+ * of the data to append.
+ */
+ CREATE_APPEND,
+ ;
}