You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/05/01 19:58:09 UTC
[GitHub] [arrow-adbc] paleolimbot opened a new pull request, #638: feat(r/adbcsnowflake): Package Snowflake driver for R
paleolimbot opened a new pull request, #638:
URL: https://github.com/apache/arrow-adbc/pull/638
...Total work-in-progress:
- [x] Figure out how to build + link a static library implemented in .go
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182022828
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
@zeroshade I'm pretty sure I'm making a very go newbie mistake here...I get:
```
** using staged installation
rm: src/nanoarrow/*.o: No such file or directory
Removed 1 previously vendored files from src/
Vendoring files from arrow-adbc to src/:
- ../../adbc.h
All files successfully copied to src/
Trying 'go version' with GO_BIN at '/usr/local/go/bin/go'
go version go1.20.3 darwin/arm64
Found vendored ADBC
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../src -DADBC_EXPORT="" -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c init.c -o init.o
GOROOT="/Users/deweydunnington/Desktop/rscratch/arrow-adbc/go/" "/usr/local/go/bin/go" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "/Users/deweydunnington/Desktop/rscratch/arrow-adbc/go/adbc/pkg/snowflake"
go: cannot find main module, but found .git/config in /Users/deweydunnington/Desktop/rscratch/arrow-adbc
to create a module there, run:
cd ../../.. && go mod init
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182858639
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
The build command works! I'll have to figure out at some point how to do some sort of a vendor step but I can look at what Python is doing to make sdist work for that, too.
Unfortunately, now Go/Arrow won't compile:
```
github.com/apache/arrow/go/v12/arrow/compute/internal/kernels
# github.com/apache/arrow/go/v11/arrow/compute/internal/kernels
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:816:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:818:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:820:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:822:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:824:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:826:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:828:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:830:10: undefined: getArithmeticOpIntegral
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:832:10: undefined: getArithmeticOpFloating
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:834:10: undefined: getArithmeticOpFloating
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/base_arithmetic.go:834:10: too many errors
github.com/apache/arrow/go/v12/arrow/compute
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182968733
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
Plenty to figure out before then!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182961337
##########
r/adbcsnowflake/DESCRIPTION:
##########
@@ -0,0 +1,26 @@
+Package: adbcsnowflake
+Title: Arrow Database Connectivity (ADBC) Snowflake Driver
+Version: 0.0.0.9000
+Authors@R: c(
+ person("Dewey", "Dunnington", , "dewey@dunnington.ca", role = c("aut", "cre"),
+ comment = c(ORCID = "0000-0002-9415-4582")),
+ person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph"))
+ )
+Description: Provides a developer-facing interface to the Arrow Database
+ Connectivity (ADBC) Snowflake driver.
+License: Apache License (>= 2)
+Encoding: UTF-8
+Roxygen: list(markdown = TRUE)
+RoxygenNote: 7.2.3
+SystemRequirements: libpq
Review Comment:
shouldn't need libpq for this :smile:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1186720525
##########
r/adbcsnowflake/tools/download-go.R:
##########
@@ -0,0 +1,87 @@
+# 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.
+
+tmp_dir <- "src/go/tmp"
+
+go_version <- "1.19.9"
Review Comment:
Done! I envision that builds that need a specific Go version will pre-download/extract and set `GO_BIN` but added a fallback here as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182863956
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
*sigh* this is caused by snowflake using v11 while the fix for this is in v12. Can you add the `noasm` tag to the non-amd64 builds? That should fix this until v12 is released and we update snowflake.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1186720626
##########
r/adbcsnowflake/DESCRIPTION:
##########
@@ -0,0 +1,26 @@
+Package: adbcsnowflake
+Title: Arrow Database Connectivity (ADBC) Snowflake Driver
+Version: 0.0.0.9000
Review Comment:
That's a good catch...it's wrong for all the R drivers and I forget what the packaging script does here. After this is merged I'll open a PR to clean up the R driver family since I think I also have to add this one and postgres to the verify script.
##########
r/adbcsnowflake/DESCRIPTION:
##########
@@ -0,0 +1,26 @@
+Package: adbcsnowflake
+Title: Arrow Database Connectivity (ADBC) Snowflake Driver
+Version: 0.0.0.9000
+Authors@R: c(
+ person("Dewey", "Dunnington", , "dewey@dunnington.ca", role = c("aut", "cre"),
+ comment = c(ORCID = "0000-0002-9415-4582")),
+ person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph"))
+ )
+Description: Provides a developer-facing interface to the Arrow Database
+ Connectivity (ADBC) Snowflake driver.
+License: Apache License (>= 2)
+Encoding: UTF-8
+Roxygen: list(markdown = TRUE)
+RoxygenNote: 7.2.3
+SystemRequirements: golang
Review Comment:
Good catch!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1186483047
##########
r/adbcsnowflake/tools/download-go.R:
##########
@@ -0,0 +1,87 @@
+# 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.
+
+tmp_dir <- "src/go/tmp"
+
+go_version <- "1.19.9"
Review Comment:
Can this be made parameterizable? Users may want to control which version of Go is used to compile this.
##########
r/adbcsnowflake/DESCRIPTION:
##########
@@ -0,0 +1,26 @@
+Package: adbcsnowflake
+Title: Arrow Database Connectivity (ADBC) Snowflake Driver
+Version: 0.0.0.9000
Review Comment:
Should this match the ADBC version?
##########
r/adbcsnowflake/DESCRIPTION:
##########
@@ -0,0 +1,26 @@
+Package: adbcsnowflake
+Title: Arrow Database Connectivity (ADBC) Snowflake Driver
+Version: 0.0.0.9000
+Authors@R: c(
+ person("Dewey", "Dunnington", , "dewey@dunnington.ca", role = c("aut", "cre"),
+ comment = c(ORCID = "0000-0002-9415-4582")),
+ person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph"))
+ )
+Description: Provides a developer-facing interface to the Arrow Database
+ Connectivity (ADBC) Snowflake driver.
+License: Apache License (>= 2)
+Encoding: UTF-8
+Roxygen: list(markdown = TRUE)
+RoxygenNote: 7.2.3
+SystemRequirements: golang
Review Comment:
Is this still a requirement now if you've set it up to download Go locally and install if needed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#issuecomment-1532001689
btw @paleolimbot : #640 updates the cmake config to pass the symbols.map to the go build command to hide the symbols :smile: by passing the `-ldflags "-extldflags=-Wl,--version-script=....symbols.map"` options to the build. in case that can be helpful to you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182867827
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
Ok, now I get:
```
github.com/apache/arrow/go/v12/arrow/compute/internal/exec
# github.com/apache/arrow/go/v11/arrow/compute/internal/kernels
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/basic_arithmetic_noasm.go:27:9: undefined: getGoArithmeticOpFloatingSameType
../../../../../go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0/arrow/compute/internal/kernels/basic_arithmetic_noasm.go:35:9: undefined: getGoArithmeticFixedIntOut
github.com/apache/arrow/go/v12/arrow/compute/internal/kernels
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182940440
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
Okay, for now you'll probably have to skip arm64 / mac. Once v12 is released and I update the snowflake lib we can re-enable those.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182852622
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
can you try running the go build command from the `arrow-adbc/go/adbc` directory and change the path to be `./pkg/snowflake` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#issuecomment-1532032791
Thanks! That PR inspired the approach here...I don't think symbol mapping works on clang and in any case I need slightly different rules (I don't want the Adbc* symbols visible outside the native R extension I don't think). I've got it "working" (as in: can call at least one go symbol) on MacOS x86 and Ubuntu x86.
What is the best approach to vendor the go sources? Basically, I need to build something like Python's sdist. For the C drivers I just copy the sources before running `R CMD build` and that makes a self-contained tarball that. I feel like `go build` does something magical with the file paths but in theory I could maybe copy the `adbc/` directory with the snowflake-related folders into `src/go` here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#issuecomment-1532049629
If you have to vendor the sources, then yea I think just copying the entire `go/adbc/` dir, preserving the structure should be sufficient. For go build you basically just need to be in the same directory as the `go.mod` file or a subdirectory of that (ie: the `go/adbc/` dir).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot merged pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot merged PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182022828
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
@zeroshade I'm pretty sure I'm making a very go newbie mistake here...I get:
```
** using staged installation
rm: src/nanoarrow/*.o: No such file or directory
Removed 1 previously vendored files from src/
Vendoring files from arrow-adbc to src/:
- ../../adbc.h
All files successfully copied to src/
Trying 'go version' with GO_BIN at '/usr/local/go/bin/go'
go version go1.20.3 darwin/arm64
Found vendored ADBC
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../src -DADBC_EXPORT="" -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c init.c -o init.o
"/usr/local/go/bin/go" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "/Users/deweydunnington/Desktop/rscratch/arrow-adbc/go/adbc/pkg/snowflake"
go: cannot find main module, but found .git/config in /Users/deweydunnington/Desktop/rscratch/arrow-adbc
to create a module there, run:
cd ../../.. && go mod init
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #638: feat(r/adbcsnowflake): Package Snowflake driver for R
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #638:
URL: https://github.com/apache/arrow-adbc/pull/638#discussion_r1182881277
##########
r/adbcsnowflake/src/Makevars.in:
##########
@@ -0,0 +1,26 @@
+# 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.
+
+PKG_CPPFLAGS=-I../src -DADBC_EXPORT=""
+PKG_LIBS=-ladbc_driver_snowflake
+
+.PHONY: all gostatic
+all: $(SHLIB)
+$(SHLIB): gostatic
+
+gostatic:
+ "@gobin@" build -v -tags driverlib -o adbc_driver_snowflake.a -buildmode=c-archive "@adbchome@/go/adbc/pkg/snowflake"
Review Comment:
Works on x86 though! THIS IS SO COOL:
```
> library(adbcsnowflake)
> adbcdrivermanager::adbc_database_init(adbcsnowflake(), uri = "")
Error in stop_for_error(status, error) :
[Snowflake] 260000: account is empty
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org