Skip to content

Commit 3bdb49f

Browse files
authored
Merge branch 'main' into support_python312
2 parents b16a082 + 20c2731 commit 3bdb49f

File tree

113 files changed

+18834
-4509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+18834
-4509
lines changed

.asf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ github:
4444
projects: true
4545
collaborators: # Note: the number of collaborators is limited to 10
4646
- ajantha-bhat
47+
- syun64
48+
- kevinjqliu
4749
ghp_branch: gh-pages
4850
ghp_path: /
4951

.github/ISSUE_TEMPLATE/iceberg_bug_report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ body:
99
description: What Apache Iceberg version are you using?
1010
multiple: false
1111
options:
12-
- "0.5.0 (latest release)"
12+
- "0.6.0 (latest release)"
13+
- "0.5.0"
1314
- "0.4.0"
1415
- "0.3.0"
1516
- "0.2.0"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check Markdown links
2+
3+
on:
4+
push:
5+
paths:
6+
- mkdocs/**
7+
branches:
8+
- 'main'
9+
pull_request:
10+
11+
jobs:
12+
markdown-link-check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@master
16+
- uses: gaurav-nelson/github-action-markdown-link-check@v1

.github/workflows/python-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
run: make test-integration
4444
- name: Show debug logs
4545
if: ${{ failure() }}
46-
run: docker-compose -f dev/docker-compose.yml logs
46+
run: docker compose -f dev/docker-compose.yml logs

.github/workflows/python-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ${{ matrix.os }}
3535
strategy:
3636
matrix:
37-
os: [ ubuntu-22.04, windows-2022, macos-11 ]
37+
os: [ ubuntu-22.04, windows-2022, macos-11, macos-12, macos-13, macos-14 ]
3838

3939
steps:
4040
- uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343

4444
- uses: actions/setup-python@v5
4545
with:
46-
python-version: '3.8'
46+
python-version: '3.11'
4747

4848
- name: Install poetry
4949
run: pip install poetry
@@ -59,15 +59,15 @@ jobs:
5959
if: startsWith(matrix.os, 'ubuntu')
6060

6161
- name: Build wheels
62-
uses: pypa/cibuildwheel@v2.16.2
62+
uses: pypa/cibuildwheel@v2.18.0
6363
with:
6464
output-dir: wheelhouse
6565
config-file: "pyproject.toml"
6666
env:
6767
# Ignore 32 bit architectures
6868
CIBW_ARCHS: "auto64"
6969
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8,<3.12"
70-
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==4.2.2"
70+
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1"
7171
CIBW_TEST_EXTRAS: "s3fs,glue"
7272
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py"
7373
# There is an upstream issue with installing on MacOSX
@@ -80,7 +80,7 @@ jobs:
8080
if: startsWith(matrix.os, 'ubuntu')
8181
run: ls -lah dist/* && cp dist/* wheelhouse/
8282

83-
- uses: actions/upload-artifact@v4
83+
- uses: actions/upload-artifact@v3
8484
with:
8585
name: "release-${{ github.event.inputs.version }}"
8686
path: ./wheelhouse/*

.pre-commit-config.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ repos:
3636
- id: ruff-format
3737
args: [ --preview ]
3838
- repo: https://github.com/pre-commit/mirrors-mypy
39-
rev: v1.6.1
39+
rev: v1.8.0
4040
hooks:
4141
- id: mypy
4242
args:
4343
[--install-types, --non-interactive, --config=pyproject.toml]
4444
- repo: https://github.com/hadialqattan/pycln
45-
rev: v2.3.0
45+
rev: v2.4.0
4646
hooks:
4747
- id: pycln
4848
args: [--config=pyproject.toml]
@@ -75,3 +75,14 @@ repos:
7575
# --line-length is set to a high value to deal with very long lines
7676
- --line-length
7777
- '99999'
78+
ci:
79+
autofix_commit_msg: |
80+
[pre-commit.ci] auto fixes from pre-commit.com hooks
81+
82+
for more information, see https://pre-commit.ci
83+
autofix_prs: true
84+
autoupdate_branch: ''
85+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
86+
autoupdate_schedule: weekly
87+
skip: []
88+
submodules: false

Makefile

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

1818
install-poetry:
19-
pip install poetry==1.7.1
19+
pip install poetry==1.8.2
2020

2121
install-dependencies:
22-
poetry install -E pyarrow -E hive -E s3fs -E glue -E adlfs -E duckdb -E ray -E sql-postgres -E gcsfs
22+
poetry install -E pyarrow -E hive -E s3fs -E glue -E adlfs -E duckdb -E ray -E sql-postgres -E gcsfs -E sql-sqlite -E daft
2323

2424
install: | install-poetry install-dependencies
2525

@@ -37,17 +37,18 @@ test-s3:
3737
poetry run pytest tests/ -m s3 ${PYTEST_ARGS}
3838

3939
test-integration:
40-
docker-compose -f dev/docker-compose-integration.yml kill
41-
docker-compose -f dev/docker-compose-integration.yml rm -f
42-
docker-compose -f dev/docker-compose-integration.yml up -d
40+
docker compose -f dev/docker-compose-integration.yml kill
41+
docker compose -f dev/docker-compose-integration.yml rm -f
42+
docker compose -f dev/docker-compose-integration.yml up -d
4343
sleep 10
44-
docker-compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
44+
docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py
45+
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
4546
poetry run pytest tests/ -v -m integration ${PYTEST_ARGS}
4647

4748
test-integration-rebuild:
48-
docker-compose -f dev/docker-compose-integration.yml kill
49-
docker-compose -f dev/docker-compose-integration.yml rm -f
50-
docker-compose -f dev/docker-compose-integration.yml build --no-cache
49+
docker compose -f dev/docker-compose-integration.yml kill
50+
docker compose -f dev/docker-compose-integration.yml rm -f
51+
docker compose -f dev/docker-compose-integration.yml build --no-cache
5152

5253
test-adlfs:
5354
sh ./dev/run-azurite.sh
@@ -58,12 +59,14 @@ test-gcs:
5859
poetry run pytest tests/ -m gcs ${PYTEST_ARGS}
5960

6061
test-coverage:
61-
docker-compose -f dev/docker-compose-integration.yml kill
62-
docker-compose -f dev/docker-compose-integration.yml rm -f
63-
docker-compose -f dev/docker-compose-integration.yml up -d
62+
docker compose -f dev/docker-compose-integration.yml kill
63+
docker compose -f dev/docker-compose-integration.yml rm -f
64+
docker compose -f dev/docker-compose-integration.yml up -d
6465
sh ./dev/run-azurite.sh
6566
sh ./dev/run-gcs-server.sh
66-
docker-compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
67+
sleep 10
68+
docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py
69+
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
6770
poetry run coverage run --source=pyiceberg/ -m pytest tests/ ${PYTEST_ARGS}
6871
poetry run coverage report -m --fail-under=90
6972
poetry run coverage html

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Apache Iceberg
3-
Copyright 2017-2022 The Apache Software Foundation
3+
Copyright 2017-2024 The Apache Software Foundation
44

55
This product includes software developed at
66
The Apache Software Foundation (http://www.apache.org/).

dev/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ ENV PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.9.7-src.zip:$
3636
RUN mkdir -p ${HADOOP_HOME} && mkdir -p ${SPARK_HOME} && mkdir -p /home/iceberg/spark-events
3737
WORKDIR ${SPARK_HOME}
3838

39-
ENV SPARK_VERSION=3.4.2
40-
ENV ICEBERG_SPARK_RUNTIME_VERSION=3.4_2.12
41-
ENV ICEBERG_VERSION=1.4.0
42-
ENV AWS_SDK_VERSION=2.20.18
43-
ENV PYICEBERG_VERSION=0.4.0
39+
ENV SPARK_VERSION=3.5.0
40+
ENV ICEBERG_SPARK_RUNTIME_VERSION=3.5_2.12
41+
ENV ICEBERG_VERSION=1.5.0
42+
ENV PYICEBERG_VERSION=0.6.0
4443

45-
RUN curl --retry 3 -s -C - https://dlcdn.apache.org/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop3.tgz -o spark-${SPARK_VERSION}-bin-hadoop3.tgz \
44+
RUN curl --retry 3 -s -C - https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop3.tgz -o spark-${SPARK_VERSION}-bin-hadoop3.tgz \
4645
&& tar xzf spark-${SPARK_VERSION}-bin-hadoop3.tgz --directory /opt/spark --strip-components 1 \
4746
&& rm -rf spark-${SPARK_VERSION}-bin-hadoop3.tgz
4847

@@ -51,8 +50,7 @@ RUN curl -s https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-spark-runt
5150
&& mv iceberg-spark-runtime-${ICEBERG_SPARK_RUNTIME_VERSION}-${ICEBERG_VERSION}.jar /opt/spark/jars
5251

5352
# Download AWS bundle
54-
RUN curl -s https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/${ICEBERG_VERSION}/iceberg-aws-bundle-${ICEBERG_VERSION}.jar -Lo iceberg-aws-bundle-${ICEBERG_VERSION}.jar \
55-
&& mv iceberg-aws-bundle-${ICEBERG_VERSION}.jar /opt/spark/jars
53+
RUN curl -s https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/${ICEBERG_VERSION}/iceberg-aws-bundle-${ICEBERG_VERSION}.jar -Lo /opt/spark/jars/iceberg-aws-bundle-${ICEBERG_VERSION}.jar
5654

5755
COPY spark-defaults.conf /opt/spark/conf
5856
ENV PATH="/opt/spark/sbin:/opt/spark/bin:${PATH}"
@@ -62,7 +60,7 @@ RUN chmod u+x /opt/spark/sbin/* && \
6260

6361
RUN pip3 install -q ipython
6462

65-
RUN pip3 install "pyiceberg[s3fs]==${PYICEBERG_VERSION}"
63+
RUN pip3 install "pyiceberg[s3fs,hive]==${PYICEBERG_VERSION}"
6664

6765
COPY entrypoint.sh .
6866
COPY provision.py .

dev/docker-compose-integration.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ services:
2525
iceberg_net:
2626
depends_on:
2727
- rest
28+
- hive
2829
- minio
2930
volumes:
3031
- ./warehouse:/home/iceberg/warehouse
@@ -37,6 +38,7 @@ services:
3738
- 8080:8080
3839
links:
3940
- rest:rest
41+
- hive:hive
4042
- minio:minio
4143
rest:
4244
image: tabulario/iceberg-rest
@@ -85,5 +87,17 @@ services:
8587
/usr/bin/mc policy set public minio/warehouse;
8688
tail -f /dev/null
8789
"
90+
hive:
91+
build: hive/
92+
container_name: hive
93+
hostname: hive
94+
networks:
95+
iceberg_net:
96+
ports:
97+
- 9083:9083
98+
environment:
99+
SERVICE_NAME: "metastore"
100+
SERVICE_OPTS: "-Dmetastore.warehouse.dir=s3a://warehouse/hive/"
101+
88102
networks:
89103
iceberg_net:

0 commit comments

Comments
 (0)