You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/31 00:50:37 UTC

[GitHub] [arrow-adbc] kou commented on a diff in pull request #57: [Python] Distribute drivers as Python packages

kou commented on code in PR #57:
URL: https://github.com/apache/arrow-adbc/pull/57#discussion_r959046212


##########
python/adbc_driver_postgres/pyproject.toml:
##########
@@ -0,0 +1,43 @@
+# 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.
+
+[tool.poetry]
+name = "adbc_driver_postgres"
+version = "0.0.0-alpha0"
+description = ""
+authors = ["David Li <li...@gmail.com>"]

Review Comment:
   `"Apache Arrow Developers <de...@arrow.apache.org>"`?
   
   https://github.com/apache/arrow/blob/master/python/setup.py#L766-L767



##########
c/driver_manager/adbc_driver_manager.cc:
##########
@@ -705,18 +724,37 @@ AdbcStatusCode AdbcLoadDriver(const char* driver_name, const char* entrypoint,
 
 #endif  // defined(_WIN32)
 
-  auto result = init_func(count, driver, initialized, error);
+  auto result = AdbcLoadDriverFromInitFunc(init_func, count, driver, initialized, error);
+  if (result != ADBC_STATUS_OK) {
 #if defined(_WIN32)
-  driver->private_manager = new ManagerDriverState{handle, driver->release};
-  driver->release = &ReleaseDriver;
+
 #endif  // defined(_WIN32)
+  }

Review Comment:
   It seems that we can remove this `if (result != ADBC_STATUS_OK) { ... }` entirely.
   
   (It seems that we can write `return AdbcLoadDriverFromInitFunc(...)` directly 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