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 2420457  Add contributing info (#38)
2420457 is described below

commit 2420457cfc76381b38fea75f4fd8f4c72bae33e8
Author: David Li <[email protected]>
AuthorDate: Wed Jul 13 15:34:59 2022 -0400

    Add contributing info (#38)
---
 CONTRIBUTING.md                                    | 94 ++++++++++++++++++++++
 README.md                                          | 15 +---
 .../driver/jdbc/util/MockPreparedStatement.java    |  2 +-
 3 files changed, 96 insertions(+), 15 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..f2479d0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,94 @@
+<!---
+  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.
+-->
+
+# Contributing to ADBC
+
+## Reporting Issues
+
+Please file issues on the GitHub issue tracker:
+https://github.com/apache/arrow-adbc/issues
+
+## Building
+
+### C/C++
+
+The libraries here are all **individual** CMake projects.
+
+For example, the driver manager is built as follows:
+
+```shell
+$ mkdir -p build/driver_manager
+$ cd build/driver_manager
+$ cmake ../../c/driver_manager
+$ make -j
+```
+
+The SQLite3 and Apache Arrow Flight SQL drivers can be built similarly.
+
+To find dependencies, use CMake options such as `CMAKE_PREFIX_PATH`.
+A list of dependencies for Conda (conda-forge) is included, and can be
+used as follows:
+
+```shell
+$ conda create -n adbc -c conda-forge --file ci/conda_env_cpp.txt
+$ conda activate adbc
+```
+
+Some of Arrow's build options are supported (under a different prefix):
+
+- `ADBC_BUILD_SHARED`, `ADBC_BUILD_STATIC`: build the shared/static libraries.
+- `ADBC_BUILD_TESTS`: build the unit tests (requires googletest/gmock).
+- `ADBC_INSTALL_NAME_RPATH`: set `install_name` to `@rpath` on MacOS.
+  Usually it is more convenient to explicitly set this to `OFF` for
+  development.
+
+For example, to build and run tests for the SQLite3 driver:
+
+```shell
+$ mkdir -p build/sqlite
+$ cd build/sqlite
+$ cmake ../../c/drivers/sqlite -DADBC_BUILD_TESTS=ON
+$ make -j
+$ ctest
+```
+
+### Python
+
+```shell
+$ cd python/adbc_driver_manager
+$ pip install -r requirements-dev.txt
+$ python setup.py build_ext --inplace
+```
+
+To run tests, you will need a build of the SQLite3 driver above.
+
+```shell
+$ export LD_LIBRARY_PATH=path/to/sqlite/driver/
+$ export PYTHONPATH=$(pwd)
+$ pytest -vvx
+```
+
+### Java
+
+The Java components are a standard Maven project.
+
+```shell
+$ cd java/
+$ mvn clean install
+```
diff --git a/README.md b/README.md
index 89cdf1c..6a03022 100644
--- a/README.md
+++ b/README.md
@@ -25,17 +25,4 @@ EXPERIMENTAL. Please see the [mailing list 
discussion](https://lists.apache.org/
 
 ## Building
 
-The libraries here are all **individual** CMake projects.
-
-```shell
-$ mkdir -p build/driver_manager
-$ cd build/driver_manager
-$ cmake ../../adbc_driver_manager
-$ make
-```
-
-Some of Arrow's build options are supported (under a different prefix):
-
-- `ADBC_BUILD_SHARED`, `ADBC_BUILD_STATIC`: build the shared/static libraries
-- `ADBC_BUILD_TESTS`: build the unit tests
-- `ADBC_INSTALL_NAME_RPATH`: set `install_name` to `@rpath` on MacOS
+For detailed instructions, see CONTRIBUTING.md.
diff --git 
a/java/driver/jdbc-util/src/test/java/org/apache/arrow/adbc/driver/jdbc/util/MockPreparedStatement.java
 
b/java/driver/jdbc-util/src/test/java/org/apache/arrow/adbc/driver/jdbc/util/MockPreparedStatement.java
index 51ae7db..d456f38 100644
--- 
a/java/driver/jdbc-util/src/test/java/org/apache/arrow/adbc/driver/jdbc/util/MockPreparedStatement.java
+++ 
b/java/driver/jdbc-util/src/test/java/org/apache/arrow/adbc/driver/jdbc/util/MockPreparedStatement.java
@@ -42,8 +42,8 @@ import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Map;
 
+/** A PreparedStatement that just stores parameters set on it. */
 class MockPreparedStatement implements PreparedStatement {
-  /** A PreparedStatement that just stores parameters set on it. */
   static class ParameterHolder {
     final Object value;
     final Integer sqlType;

Reply via email to