Skip to content

Commit 5ffa582

Browse files
author
David Coe
committed
2 parents 538dd72 + ba7b690 commit 5ffa582

File tree

26 files changed

+723
-95
lines changed

26 files changed

+723
-95
lines changed

.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
# All of the following environment variables are required to set default values
19-
# for the parameters in docker-compose.yml.
19+
# for the parameters in compose.yaml.
2020

2121
# Default repository to pull and push images from
2222
REPO=apache/arrow-dev
@@ -37,14 +37,14 @@ GO=1.22.9
3737
ARROW_MAJOR_VERSION=14
3838
DOTNET=8.0
3939

40-
# Used through docker-compose.yml and serves as the default version for the
40+
# Used through compose.yaml and serves as the default version for the
4141
# ci/scripts/install_vcpkg.sh script. Keep in sync with apache/arrow .env.
4242
# When updating, also update the docs, which list the version of libpq/SQLite
4343
# that vcpkg (and hence our wheels) ship
4444
VCPKG="943c5ef1c8f6b5e6ced092b242c8299caae2ff01"
4545

4646
# These are used to tell tests where to find services for integration testing.
47-
# They are valid if the services are started with the docker-compose config.
47+
# They are valid if the services are started with the compose config.
4848
ADBC_DREMIO_FLIGHTSQL_PASS=dremio123
4949
ADBC_DREMIO_FLIGHTSQL_URI=grpc+tcp://localhost:32010
5050
ADBC_DREMIO_FLIGHTSQL_USER=dremio

.github/workflows/dev_adbc.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Dev ADBC
19+
20+
on:
21+
pull_request:
22+
branches:
23+
- main
24+
paths:
25+
- "dev/**"
26+
- ".github/workflows/dev_adbc.yml"
27+
push:
28+
paths:
29+
- "dev/**"
30+
- ".github/workflows/dev_adbc.yml"
31+
32+
concurrency:
33+
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
34+
cancel-in-progress: true
35+
36+
permissions:
37+
contents: read
38+
39+
defaults:
40+
run:
41+
shell: bash -l -eo pipefail {0}
42+
43+
jobs:
44+
pre-commit:
45+
name: "pre-commit"
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0
51+
persist-credentials: false
52+
53+
- name: Cache Conda
54+
uses: actions/cache@v4
55+
with:
56+
path: ~/conda_pkgs_dir
57+
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
58+
- uses: conda-incubator/setup-miniconda@v3
59+
with:
60+
miniforge-version: latest
61+
use-only-tar-bz2: false
62+
use-mamba: true
63+
64+
- name: Install Dependencies
65+
run: |
66+
mamba install -c conda-forge \
67+
--file ci/conda_env_dev.txt \
68+
pytest
69+
70+
- name: Test
71+
run: |
72+
pytest -vv dev/adbc_dev/

.github/workflows/dev_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
env:
6464
PR_TITLE: ${{ github.event.pull_request.title }}
6565
run: |
66-
python .github/workflows/dev_pr/title_check.py $(pwd)/pr_checkout "$PR_TITLE"
66+
python dev/adbc_dev/title_check.py $(pwd)/pr_checkout "$PR_TITLE"
6767
6868
# Pings make it into the commit message where they annoy the user every
6969
# time the commit gets pushed somewhere

c/driver/postgresql/postgresql_test.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,29 @@ TEST_F(PostgresStatementTest, SetUseCopyFalse) {
16961696
ASSERT_EQ(reader.array->release, nullptr);
16971697
}
16981698

1699+
TEST_F(PostgresStatementTest, UnknownOid) {
1700+
// Regression test for https://github.com/apache/arrow-adbc/issues/2448
1701+
ASSERT_THAT(AdbcStatementNew(&connection, &statement, &error), IsOkStatus(&error));
1702+
ASSERT_THAT(AdbcStatementSetSqlQuery(
1703+
&statement, "SELECT typacl FROM pg_type WHERE oid <= 6157", &error),
1704+
IsOkStatus(&error));
1705+
adbc_validation::StreamReader reader;
1706+
ASSERT_THAT(AdbcStatementExecuteQuery(&statement, &reader.stream.value,
1707+
&reader.rows_affected, &error),
1708+
IsOkStatus(&error));
1709+
ASSERT_NO_FATAL_FAILURE(reader.GetSchema());
1710+
ASSERT_EQ(1, reader.fields.size());
1711+
ASSERT_EQ(NANOARROW_TYPE_BINARY, reader.fields[0].type);
1712+
struct ArrowStringView extension_name = reader.fields[0].extension_name;
1713+
ASSERT_EQ("arrow.opaque",
1714+
std::string_view(extension_name.data,
1715+
static_cast<size_t>(extension_name.size_bytes)));
1716+
struct ArrowStringView extension_metadata = reader.fields[0].extension_metadata;
1717+
ASSERT_EQ(R"({"type_name": "unnamed<oid:1034>", "vendor_name": "PostgreSQL"})",
1718+
std::string_view(extension_metadata.data,
1719+
static_cast<size_t>(extension_metadata.size_bytes)));
1720+
}
1721+
16991722
struct TypeTestCase {
17001723
std::string name;
17011724
std::string sql_type;

c/driver/postgresql/result_helper.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,10 @@ Status PqResultHelper::ResolveOutputTypes(PostgresTypeResolver& type_resolver,
167167
const Oid pg_oid = PQftype(result_, i);
168168
PostgresType pg_type;
169169
if (type_resolver.Find(pg_oid, &pg_type, &na_error) != NANOARROW_OK) {
170-
Status status =
171-
Status::NotImplemented("[libpq] Column #", i + 1, " (\"", PQfname(result_, i),
172-
"\") has unknown type code ", pg_oid);
173-
ClearResult();
174-
return status;
170+
// We couldn't look up the OID.
171+
// TODO(apache/arrow-adbc#1243): issue a warning (maybe reloading the
172+
// connection will load the OIDs if it was a newly created type)
173+
pg_type = PostgresType::Unnamed(pg_oid);
175174
}
176175

177176
root_type.AppendChild(PQfname(result_, i), pg_type);

ci/conda_env_dev.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
commitizen
1918
gh>=2.32.0
2019
jq
2120
pre-commit
21+
pygit2
22+
python
23+
python-dotenv
2224
twine

ci/scripts/docs_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ main() {
2626
popd
2727

2828
pushd "$source_dir/java"
29-
mvn site
29+
mvn --no-transfer-progress site
3030
popd
3131

3232
pushd "$source_dir/docs"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ services:
7777

7878
############################ Python conda ##################################
7979

80-
# Must be run as docker-compose run -e HOST_USER_ID=$(id -u) python-conda
80+
# Must be run as docker compose run -e HOST_USER_ID=$(id -u) python-conda
8181
python-conda:
8282
image: condaforge/linux-anvil-cos7-x86_64
8383
volumes:

csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PackageReadmeFile>readme.md</PackageReadmeFile>
77
</PropertyGroup>
88
<ItemGroup>
9-
<PackageReference Include="Apache.Arrow" Version="18.1.0" />
9+
<PackageReference Include="Apache.Arrow" Version="19.0.0" />
1010
<PackageReference Include="System.Text.Json" Version="8.0.5" />
1111
</ItemGroup>
1212
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net6.0'))">

csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="8.0.2" Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'" />
7-
<PackageReference Include="Apache.Arrow.Flight" Version="18.1.0" />
7+
<PackageReference Include="Apache.Arrow.Flight" Version="19.0.0" />
88
</ItemGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\..\Apache.Arrow.Adbc\Apache.Arrow.Adbc.csproj" />

0 commit comments

Comments
 (0)