Skip to content

Commit

Permalink
Merge branch 'main' into dev/birschick-bq/open-telemetry-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
birschick-bq committed Nov 7, 2024
2 parents 2384ed4 + 28b8c1b commit 3824499
Show file tree
Hide file tree
Showing 127 changed files with 6,095 additions and 1,167 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/native-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ jobs:
miniforge-version: latest
use-mamba: true
- name: Install Dependencies
shell: bash -l {0}
shell: pwsh
run: |
mamba install -c conda-forge \
--file ci/conda_env_cpp.txt
mamba install -c conda-forge `
--file ci\conda_env_cpp.txt
# Force bundled gtest
mamba uninstall gtest
Expand Down Expand Up @@ -137,10 +137,10 @@ jobs:
miniforge-version: latest
use-mamba: true
- name: Install Dependencies
shell: bash -l {0}
shell: pwsh
run: |
mamba install -c conda-forge \
--file ci/conda_env_cpp.txt
mamba install -c conda-forge `
--file ci\conda_env_cpp.txt
# Force bundled gtest
mamba uninstall gtest
Expand Down Expand Up @@ -213,10 +213,10 @@ jobs:
miniforge-version: latest
use-mamba: true
- name: Install Dependencies
shell: bash -l {0}
shell: pwsh
run: |
mamba install -c conda-forge \
--file ci/conda_env_cpp.txt
mamba install -c conda-forge `
--file ci\conda_env_cpp.txt
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
Expand Down Expand Up @@ -280,12 +280,12 @@ jobs:
miniforge-version: latest
use-mamba: true
- name: Install Dependencies
shell: bash -l {0}
shell: pwsh
run: |
mamba install -c conda-forge \
python=${{ matrix.python }} \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
mamba install -c conda-forge `
python=${{ matrix.python }} `
--file ci\conda_env_cpp.txt `
--file ci\conda_env_python.txt
- uses: actions/download-artifact@v4
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ jobs:
run: |
rustup toolchain install stable --no-self-update
rustup default stable
- name: Install Protoc
if: runner.os == 'Linux'
run: |
curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-$(uname -m).zip" -o protoc.zip
unzip protoc.zip -d $HOME/.local
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install Protoc
if: runner.os == 'macOS'
run: |
curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-osx-universal_binary.zip" -o protoc.zip
unzip "protoc.zip" -d $HOME/.local
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- uses: actions/download-artifact@v4
with:
name: driver-manager-${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ cpp/.idea/
c/apidoc/html/
c/apidoc/latex/
c/apidoc/xml/
c/apidoc/objects.inv
docs/example.gz
docs/example1.dat
docs/example3.dat
Expand Down
11 changes: 3 additions & 8 deletions c/apidoc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ EXTRACT_ALL = NO
# be included in the documentation.
# The default value is: NO.

EXTRACT_PRIVATE = NO
EXTRACT_PRIVATE = YES

# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
# methods of a class will be included in the documentation.
Expand Down Expand Up @@ -891,7 +891,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../../c/include/arrow-adbc/adbc.h ../../README.md ../../c/include/arrow-adbc/adbc_driver_manager.h
INPUT = ../../c/include/arrow-adbc/adbc.h ../../README.md ../../c/include/arrow-adbc/adbc_driver_manager.h ../../c/driver/framework/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -920,12 +920,7 @@ INPUT_ENCODING = UTF-8
# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
# *.vhdl, *.ucf, *.qsf and *.ice.

FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
FILE_PATTERNS = *.java \
*.ii \
*.ixx \
*.ipp \
Expand Down
11 changes: 11 additions & 0 deletions c/driver/framework/base_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,22 @@ class Driver {
}

auto error_obj = reinterpret_cast<Status*>(error->private_data);
if (!error_obj) {
return 0;
}
return error_obj->CDetailCount();
}

static AdbcErrorDetail CErrorGetDetail(const AdbcError* error, int index) {
if (error->vendor_code != ADBC_ERROR_VENDOR_CODE_PRIVATE_DATA) {
return {nullptr, nullptr, 0};
}

auto error_obj = reinterpret_cast<Status*>(error->private_data);
if (!error_obj) {
return {nullptr, nullptr, 0};
}

return error_obj->CDetail(index);
}

Expand Down
8 changes: 4 additions & 4 deletions c/driver/framework/objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ struct GetObjectsBuilder {
}

Status AppendCatalogs() {
UNWRAP_STATUS(helper->LoadCatalogs());
UNWRAP_STATUS(helper->LoadCatalogs(catalog_filter));
while (true) {
UNWRAP_RESULT(auto maybe_catalog, helper->NextCatalog());
if (!maybe_catalog.has_value()) break;
Expand All @@ -302,7 +302,7 @@ struct GetObjectsBuilder {
}

Status AppendSchemas(std::string_view catalog) {
UNWRAP_STATUS(helper->LoadSchemas(catalog));
UNWRAP_STATUS(helper->LoadSchemas(catalog, schema_filter));
while (true) {
UNWRAP_RESULT(auto maybe_schema, helper->NextSchema());
if (!maybe_schema.has_value()) break;
Expand All @@ -323,7 +323,7 @@ struct GetObjectsBuilder {
}

Status AppendTables(std::string_view catalog, std::string_view schema) {
UNWRAP_STATUS(helper->LoadTables(catalog, schema));
UNWRAP_STATUS(helper->LoadTables(catalog, schema, table_filter, table_types));
while (true) {
UNWRAP_RESULT(auto maybe_table, helper->NextTable());
if (!maybe_table.has_value()) break;
Expand All @@ -348,7 +348,7 @@ struct GetObjectsBuilder {

Status AppendColumns(std::string_view catalog, std::string_view schema,
std::string_view table) {
UNWRAP_STATUS(helper->LoadColumns(catalog, schema, table));
UNWRAP_STATUS(helper->LoadColumns(catalog, schema, table, column_filter));
while (true) {
UNWRAP_RESULT(auto maybe_column, helper->NextColumn());
if (!maybe_column.has_value()) break;
Expand Down
12 changes: 8 additions & 4 deletions c/driver/framework/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,30 @@ struct GetObjectsHelper {
return status::NotImplemented("GetObjects");
}

virtual Status LoadCatalogs() {
virtual Status LoadCatalogs(std::optional<std::string_view> catalog_filter) {
return status::NotImplemented("GetObjects at depth = catalog");
};

virtual Result<std::optional<std::string_view>> NextCatalog() { return std::nullopt; }

virtual Status LoadSchemas(std::string_view catalog) {
virtual Status LoadSchemas(std::string_view catalog,
std::optional<std::string_view> schema_filter) {
return status::NotImplemented("GetObjects at depth = schema");
};

virtual Result<std::optional<std::string_view>> NextSchema() { return std::nullopt; }

virtual Status LoadTables(std::string_view catalog, std::string_view schema) {
virtual Status LoadTables(std::string_view catalog, std::string_view schema,
std::optional<std::string_view> table_filter,
const std::vector<std::string_view>& table_types) {
return status::NotImplemented("GetObjects at depth = table");
};

virtual Result<std::optional<Table>> NextTable() { return std::nullopt; }

virtual Status LoadColumns(std::string_view catalog, std::string_view schema,
std::string_view table) {
std::string_view table,
std::optional<std::string_view> column_filter) {
return status::NotImplemented("GetObjects at depth = column");
};

Expand Down
1 change: 1 addition & 0 deletions c/driver/framework/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class Status {
#undef STATUS_CTOR

private:
/// \brief Private Status implementation details
struct Impl {
// invariant: code is never OK
AdbcStatusCode code;
Expand Down
Loading

0 comments on commit 3824499

Please sign in to comment.