Skip to content

Commit 0a19adf

Browse files
committed
Merge branch 'main' into datafusion-integration-test
2 parents dcfed20 + 32404bf commit 0a19adf

Some content is hidden

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

70 files changed

+4101
-1144
lines changed

.github/actions/setup-builder/action.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ name: Prepare Rust Builder
2121
description: 'Prepare Rust Build Environment'
2222
inputs:
2323
rust-version:
24-
description: 'version of rust to install (e.g. stable)'
25-
required: true
26-
default: 'stable'
24+
description: 'version of rust to install and use'
2725
runs:
2826
using: "composite"
2927
steps:
30-
- name: Setup Rust toolchain
28+
- name: Setup specified Rust toolchain
3129
shell: bash
30+
if: ${{ inputs.rust-version != '' }}
3231
run: |
3332
echo "Installing ${{ inputs.rust-version }}"
3433
rustup toolchain install ${{ inputs.rust-version }}
35-
rustup default ${{ inputs.rust-version }}
34+
rustup override set ${{ inputs.rust-version }}
35+
rustup component add rustfmt clippy
36+
- name: Setup Rust toolchain according to rust-toolchain.toml
37+
shell: bash
38+
if: ${{ inputs.rust-version == '' }}
39+
run: |
40+
echo "Installing toolchain according to rust-toolchain.toml"
41+
rustup show
3642
rustup component add rustfmt clippy
3743
- name: Fixup git permissions
3844
# https://github.com/actions/checkout/issues/766

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ updates:
3030
schedule:
3131
interval: "weekly"
3232
day: "sunday"
33+
open-pull-requests-limit: 50

.github/workflows/ci.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v4
4545

46+
- name: Setup Rust toolchain
47+
uses: ./.github/actions/setup-builder
48+
4649
- name: Check License Header
4750
uses: apache/skywalking-eyes/[email protected]
4851

@@ -89,12 +92,10 @@ jobs:
8992

9093
- name: Setup Rust toolchain
9194
uses: ./.github/actions/setup-builder
92-
with:
93-
rust-version: ${{ env.rust_msrv }}
9495

9596
- name: Cache Rust artifacts
9697
uses: Swatinem/rust-cache@v2
97-
98+
9899
- name: Build
99100
run: make build
100101

@@ -109,6 +110,9 @@ jobs:
109110
steps:
110111
- uses: actions/checkout@v4
111112

113+
- name: Setup Rust toolchain
114+
uses: ./.github/actions/setup-builder
115+
112116
- name: Cache Rust artifacts
113117
uses: Swatinem/rust-cache@v2
114118

@@ -122,8 +126,6 @@ jobs:
122126

123127
- name: Setup Rust toolchain
124128
uses: ./.github/actions/setup-builder
125-
with:
126-
rust-version: ${{ env.rust_msrv }}
127129

128130
- name: Cache Rust artifacts
129131
uses: Swatinem/rust-cache@v2
@@ -136,3 +138,24 @@ jobs:
136138

137139
- name: Doc Test
138140
run: cargo test --no-fail-fast --doc --all-features --workspace
141+
142+
msrv:
143+
name: Verify MSRV
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: actions/checkout@v4
147+
- name: Setup Nightly Rust toolchain
148+
uses: ./.github/actions/setup-builder
149+
- name: Generate minimal versions lockfile
150+
run: |
151+
cargo generate-lockfile -Z direct-minimal-versions -Z minimal-versions
152+
# Some dependencies don't correctly specify a minimal version for their dependencies and will fail to build.
153+
# So we update these transitive dependencies here.
154+
cargo update tap faststr metainfo linkedbytes
155+
- name: Setup MSRV Rust toolchain
156+
uses: ./.github/actions/setup-builder
157+
with:
158+
rust-version: ${{ env.rust_msrv }}
159+
- name: Check MSRV
160+
run: |
161+
cargo +${{ env.rust_msrv }} check --locked --workspace --exclude iceberg-datafusion --exclude iceberg-catalog-s3tables --exclude iceberg-integration-tests

.github/workflows/ci_typos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v4
4444
- name: Check typos
45-
uses: crate-ci/typos@v1.28.4
45+
uses: crate-ci/typos@v1.29.5

Cargo.toml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,62 +41,63 @@ rust-version = "1.77.1"
4141
anyhow = "1.0.72"
4242
apache-avro = "0.17"
4343
array-init = "2"
44-
arrow-arith = { version = "53" }
45-
arrow-array = { version = "53" }
46-
arrow-cast = { version = "53" }
47-
arrow-ord = { version = "53" }
48-
arrow-schema = { version = "53" }
49-
arrow-select = { version = "53" }
50-
arrow-string = { version = "53" }
44+
arrow-arith = { version = "53.3.0" }
45+
arrow-array = { version = "53.4.0" }
46+
arrow-cast = { version = "53.4.0" }
47+
arrow-ord = { version = "53.4.0" }
48+
arrow-schema = { version = "53.4.0" }
49+
arrow-select = { version = "53.4.0" }
50+
arrow-string = { version = "53.4.0" }
5151
async-stream = "0.3.5"
52-
async-trait = "0.1"
52+
async-trait = "0.1.86"
5353
async-std = "1.12"
54-
aws-config = "1.1.8"
55-
aws-sdk-glue = "1.21"
54+
aws-config = "1"
55+
aws-sdk-glue = "1.39"
5656
bimap = "0.6"
5757
bitvec = "1.0.1"
58-
bytes = "1.5"
59-
chrono = "0.4.34"
58+
bytes = "1.6"
59+
chrono = "0.4.38"
6060
ctor = "0.2.8"
61+
datafusion = "44"
6162
derive_builder = "0.20"
6263
either = "1"
6364
env_logger = "0.11.0"
64-
fnv = "1"
65+
fnv = "1.0.7"
6566
futures = "0.3"
6667
iceberg = { version = "0.4.0", path = "./crates/iceberg" }
6768
iceberg-catalog-rest = { version = "0.4.0", path = "./crates/catalog/rest" }
6869
iceberg-catalog-hms = { version = "0.4.0", path = "./crates/catalog/hms" }
6970
iceberg-catalog-memory = { version = "0.4.0", path = "./crates/catalog/memory" }
7071
iceberg-datafusion = { version = "0.4.0", path = "./crates/integrations/datafusion" }
7172
itertools = "0.13"
72-
log = "0.4"
73+
log = "0.4.22"
7374
mockito = "1"
7475
murmur3 = "0.5.2"
7576
num-bigint = "0.4.6"
76-
once_cell = "1"
77-
opendal = "0.51.0"
77+
once_cell = "1.19"
78+
opendal = "0.51.1"
7879
ordered-float = "4"
79-
parquet = "53.1"
80-
paste = "1"
80+
parquet = "53.4.0"
81+
paste = "1.0.15"
8182
pilota = "0.11.2"
8283
pretty_assertions = "1.4"
8384
port_scanner = "0.1.5"
84-
rand = "0.8"
85+
rand = "0.8.5"
8586
regex = "1.10.5"
86-
reqwest = { version = "0.12", default-features = false, features = ["json"] }
87+
reqwest = { version = "0.12.2", default-features = false, features = ["json"] }
8788
rust_decimal = "1.31"
88-
serde = { version = "1", features = ["rc"] }
89-
serde_bytes = "0.11.8"
90-
serde_derive = "1"
91-
serde_json = "1"
89+
serde = { version = "1.0.204", features = ["rc"] }
90+
serde_bytes = "0.11.15"
91+
serde_derive = "1.0.204"
92+
serde_json = "1.0.138"
9293
serde_repr = "0.1.16"
9394
serde_with = "3.4"
94-
tempfile = "3.8"
95-
tokio = { version = "1", default-features = false }
95+
tempfile = "3.16"
96+
tokio = { version = "1.36", default-features = false }
9697
typed-builder = "0.20"
97-
url = "2"
98+
url = "2.2.2"
9899
urlencoding = "2"
99-
uuid = { version = "1.6.1", features = ["v7"] }
100+
uuid = { version = "1.12.1", features = ["v7"] }
100101
volo-thrift = "0.10"
101102
hive_metastore = "0.1"
102103
tera = "1"

bindings/python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ build-backend = "maturin"
2323
name = "pyiceberg_core"
2424
version = "0.4.0"
2525
readme = "project-description.md"
26+
requires-python = "~=3.9"
2627
classifiers = [
2728
"Development Status :: 4 - Beta",
2829
"Intended Audience :: Developers",

crates/catalog/glue/src/catalog.rs

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ use std::fmt::Debug;
2020

2121
use async_trait::async_trait;
2222
use aws_sdk_glue::types::TableInput;
23-
use iceberg::io::FileIO;
23+
use iceberg::io::{
24+
FileIO, S3_ACCESS_KEY_ID, S3_ENDPOINT, S3_REGION, S3_SECRET_ACCESS_KEY, S3_SESSION_TOKEN,
25+
};
2426
use iceberg::spec::{TableMetadata, TableMetadataBuilder};
2527
use iceberg::table::Table;
2628
use iceberg::{
@@ -34,7 +36,9 @@ use crate::utils::{
3436
convert_to_database, convert_to_glue_table, convert_to_namespace, create_metadata_location,
3537
create_sdk_config, get_default_table_location, get_metadata_location, validate_namespace,
3638
};
37-
use crate::with_catalog_id;
39+
use crate::{
40+
with_catalog_id, AWS_ACCESS_KEY_ID, AWS_REGION_NAME, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN,
41+
};
3842

3943
#[derive(Debug, TypedBuilder)]
4044
/// Glue Catalog configuration
@@ -69,11 +73,40 @@ impl GlueCatalog {
6973
/// Create a new glue catalog
7074
pub async fn new(config: GlueCatalogConfig) -> Result<Self> {
7175
let sdk_config = create_sdk_config(&config.props, config.uri.as_ref()).await;
76+
let mut file_io_props = config.props.clone();
77+
if !file_io_props.contains_key(S3_ACCESS_KEY_ID) {
78+
if let Some(access_key_id) = file_io_props.get(AWS_ACCESS_KEY_ID) {
79+
file_io_props.insert(S3_ACCESS_KEY_ID.to_string(), access_key_id.to_string());
80+
}
81+
}
82+
if !file_io_props.contains_key(S3_SECRET_ACCESS_KEY) {
83+
if let Some(secret_access_key) = file_io_props.get(AWS_SECRET_ACCESS_KEY) {
84+
file_io_props.insert(
85+
S3_SECRET_ACCESS_KEY.to_string(),
86+
secret_access_key.to_string(),
87+
);
88+
}
89+
}
90+
if !file_io_props.contains_key(S3_REGION) {
91+
if let Some(region) = file_io_props.get(AWS_REGION_NAME) {
92+
file_io_props.insert(S3_REGION.to_string(), region.to_string());
93+
}
94+
}
95+
if !file_io_props.contains_key(S3_SESSION_TOKEN) {
96+
if let Some(session_token) = file_io_props.get(AWS_SESSION_TOKEN) {
97+
file_io_props.insert(S3_SESSION_TOKEN.to_string(), session_token.to_string());
98+
}
99+
}
100+
if !file_io_props.contains_key(S3_ENDPOINT) {
101+
if let Some(aws_endpoint) = config.uri.as_ref() {
102+
file_io_props.insert(S3_ENDPOINT.to_string(), aws_endpoint.to_string());
103+
}
104+
}
72105

73106
let client = aws_sdk_glue::Client::new(&sdk_config);
74107

75108
let file_io = FileIO::from_path(&config.warehouse)?
76-
.with_props(&config.props)
109+
.with_props(file_io_props)
77110
.build()?;
78111

79112
Ok(GlueCatalog {

crates/catalog/glue/tests/glue_catalog_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn before_all() {
4444
normalize_test_name(module_path!()),
4545
format!("{}/testdata/glue_catalog", env!("CARGO_MANIFEST_DIR")),
4646
);
47-
docker_compose.run();
47+
docker_compose.up();
4848
guard.replace(docker_compose);
4949
}
5050

crates/catalog/hms/tests/hms_catalog_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn before_all() {
4343
normalize_test_name(module_path!()),
4444
format!("{}/testdata/hms_catalog", env!("CARGO_MANIFEST_DIR")),
4545
);
46-
docker_compose.run();
46+
docker_compose.up();
4747
guard.replace(docker_compose);
4848
}
4949

crates/catalog/rest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ chrono = { workspace = true }
3535
http = "1.1.0"
3636
iceberg = { workspace = true }
3737
itertools = { workspace = true }
38-
log = "0.4.20"
38+
log = { workspace = true }
3939
reqwest = { workspace = true }
4040
serde = { workspace = true }
4141
serde_derive = { workspace = true }

crates/catalog/rest/tests/rest_catalog_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn before_all() {
4141
normalize_test_name(module_path!()),
4242
format!("{}/testdata/rest_catalog", env!("CARGO_MANIFEST_DIR")),
4343
);
44-
docker_compose.run();
44+
docker_compose.up();
4545
guard.replace(docker_compose);
4646
}
4747

crates/catalog/s3tables/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "iceberg-catalog-s3tables"
2020
version = { workspace = true }
2121
edition = { workspace = true }
2222
homepage = { workspace = true }
23-
rust-version = { workspace = true }
23+
rust-version = "1.81.0"
2424

2525
categories = ["database"]
2626
description = "Apache Iceberg Rust S3Tables Catalog"
@@ -32,9 +32,10 @@ keywords = ["iceberg", "sql", "catalog"]
3232
anyhow = { workspace = true }
3333
async-trait = { workspace = true }
3434
aws-config = { workspace = true }
35-
aws-sdk-s3tables = "1.2.0"
35+
aws-sdk-s3tables = "1.8.0"
3636
iceberg = { workspace = true }
3737
serde_json = { workspace = true }
38+
typed-builder = { workspace = true }
3839
uuid = { workspace = true, features = ["v4"] }
3940

4041
[dev-dependencies]

crates/catalog/s3tables/src/catalog.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ use iceberg::{
3131
Catalog, Error, ErrorKind, Namespace, NamespaceIdent, Result, TableCommit, TableCreation,
3232
TableIdent,
3333
};
34+
use typed_builder::TypedBuilder;
3435

3536
use crate::utils::{create_metadata_location, create_sdk_config};
3637

3738
/// S3Tables catalog configuration.
38-
#[derive(Debug)]
39+
#[derive(Debug, TypedBuilder)]
3940
pub struct S3TablesCatalogConfig {
4041
/// Unlike other buckets, S3Tables bucket is not a physical bucket, but a virtual bucket
4142
/// that is managed by s3tables. We can't directly access the bucket with path like
@@ -48,8 +49,10 @@ pub struct S3TablesCatalogConfig {
4849
/// - `aws_access_key_id`: The AWS access key ID to use.
4950
/// - `aws_secret_access_key`: The AWS secret access key to use.
5051
/// - `aws_session_token`: The AWS session token to use.
52+
#[builder(default)]
5153
properties: HashMap<String, String>,
5254
/// Endpoint URL for the catalog.
55+
#[builder(default, setter(strip_option(fallback = endpoint_url_opt)))]
5356
endpoint_url: Option<String>,
5457
}
5558

@@ -515,12 +518,9 @@ mod tests {
515518
None => return Ok(None),
516519
};
517520

518-
let properties = HashMap::new();
519-
let config = S3TablesCatalogConfig {
520-
table_bucket_arn,
521-
properties,
522-
endpoint_url: None,
523-
};
521+
let config = S3TablesCatalogConfig::builder()
522+
.table_bucket_arn(table_bucket_arn)
523+
.build();
524524

525525
Ok(Some(S3TablesCatalog::new(config).await?))
526526
}

crates/catalog/s3tables/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121

2222
mod catalog;
2323
mod utils;
24+
25+
pub use catalog::*;

crates/catalog/sql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ uuid = { workspace = true, features = ["v4"] }
4040
iceberg_test_utils = { path = "../../test_utils", features = ["tests"] }
4141
itertools = { workspace = true }
4242
regex = "1.10.5"
43-
sqlx = { version = "0.8.0", features = [
43+
sqlx = { version = "0.8.1", features = [
4444
"tls-rustls",
4545
"runtime-tokio",
4646
"any",

crates/examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rust-version = { workspace = true }
2727
[dependencies]
2828
iceberg = { workspace = true }
2929
iceberg-catalog-rest = { workspace = true }
30-
tokio = { version = "1", features = ["full"] }
30+
tokio = { workspace = true, features = ["full"] }
3131

3232
[[example]]
3333
name = "rest-catalog-namespace"

0 commit comments

Comments
 (0)