Skip to content

Commit

Permalink
Merge branch 'apache:main' into dev/snowflakedriver
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhcoe authored Sep 28, 2023
2 parents 0cb2127 + 608982d commit 3708aeb
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 70 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,22 +958,3 @@ jobs:
./ci/scripts/python_wheel_upload.sh upload-staging/adbc_*.tar.gz upload-staging/*.whl
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}

clean-gemfury:
name: "Clean old releases"
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs:
- upload-gemfury
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: true

- name: Clean old releases
run: |
gem install --user-install gemfury
ruby ./ci/scripts/gemfury_clean.rb
env:
GEMFURY_API_TOKEN: ${{ secrets.GEMFURY_API_TOKEN }}
17 changes: 12 additions & 5 deletions c/driver/postgresql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ add_arrow_lib(adbc_driver_postgresql
adbc_driver_common
nanoarrow
${LIBPQ_STATIC_LIBRARIES})
include_directories(SYSTEM ${REPOSITORY_ROOT})
include_directories(SYSTEM ${REPOSITORY_ROOT}/c/)
include_directories(SYSTEM ${LIBPQ_INCLUDE_DIRS})
include_directories(SYSTEM ${REPOSITORY_ROOT}/c/vendor)
include_directories(SYSTEM ${REPOSITORY_ROOT}/c/driver)

foreach(LIB_TARGET ${ADBC_LIBRARIES})
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING)
target_include_directories(${LIB_TARGET} SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
${LIBPQ_INCLUDE_DIRS}
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
endforeach()

if(ADBC_TEST_LINKAGE STREQUAL "shared")
Expand All @@ -83,5 +84,11 @@ if(ADBC_BUILD_TESTS)
nanoarrow
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-postgresql-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-postgresql-test SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
${LIBPQ_INCLUDE_DIRS}
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
adbc_configure_target(adbc-driver-postgresql-test)
endif()
42 changes: 0 additions & 42 deletions ci/scripts/gemfury_clean.rb

This file was deleted.

4 changes: 2 additions & 2 deletions go/adbc/driver/snowflake/statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ func (st *statement) SetOption(key string, val string) error {
return st.SetOptionInt(key, int64(concurrency))
default:
return adbc.Error{
Msg: fmt.Sprintf("invalid statement option %s=%s", key, val),
Code: adbc.StatusInvalidArgument,
Msg: fmt.Sprintf("[Snowflake] Unknown statement option '%s'", key),
Code: adbc.StatusNotImplemented,
}
}
return nil
Expand Down
2 changes: 2 additions & 0 deletions go/adbc/drivermgr/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ package drivermgr
// #cgo windows CFLAGS: -DADBC_EXPORTING
// #cgo windows CPPFLAGS: -DADBC_EXPORTING
// #cgo CXXFLAGS: -std=c++11
// #if !defined(ADBC_EXPORTING)
// #define ADBC_EXPORTING
// #endif
// #include "adbc.h"
// #include <stdlib.h>
//
Expand Down
6 changes: 4 additions & 2 deletions go/adbc/pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
# limitations under the License.

GO_BUILD=go build
RM=rm
ifeq ($(shell go env GOOS),linux)
SUFFIX=so
else ifeq ($(shell go env GOOS),windows)
SUFFIX=dll
RM=del
else
SUFFIX=dylib
endif
Expand All @@ -33,12 +35,12 @@ all: $(DRIVERS)

libadbc_driver_%.$(SUFFIX): %
$(GO_BUILD) -tags driverlib -o $@ -buildmode=c-shared -ldflags "-s -w" ./$<
rm $(basename $@).h
$(RM) $(basename $@).h

regenerate:
go run gen/main.go -prefix FlightSQL -o ./flightsql/ -driver ../driver/flightsql
go run gen/main.go -prefix PanicDummy -o ./panicdummy/ -driver ../driver/panicdummy
go run gen/main.go -prefix Snowflake -o ./snowflake/ -driver ../driver/snowflake

clean:
rm $(DRIVERS)
$(RM) $(DRIVERS)

0 comments on commit 3708aeb

Please sign in to comment.