Skip to content

Commit 9ceb651

Browse files
authored
Merge branch 'apache:main' into kris-gaudel/configurable-manifest-cache
2 parents b6d6c81 + c0e7c6d commit 9ceb651

File tree

6 files changed

+67
-37
lines changed

6 files changed

+67
-37
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ test-gcs: ## Run tests marked with @pytest.mark.gcs
133133
sh ./dev/run-gcs-server.sh
134134
$(TEST_RUNNER) pytest tests/ -m gcs $(PYTEST_ARGS)
135135

136-
test-coverage: COVERAGE=1
137-
test-coverage: test test-integration test-s3 test-adls test-gcs coverage-report ## Run all tests with coverage and report
136+
test-coverage: ## Run all tests with coverage and report
137+
$(MAKE) COVERAGE=1 test test-integration test-s3 test-adls test-gcs
138+
$(MAKE) coverage-report
138139

139140
coverage-report: ## Combine and report coverage
140141
uv run $(PYTHON_ARG) coverage combine

dev/.rat-excludes

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.github/*
2-
.rat-excludes
3-
build
4-
.git
5-
.gitignore
1+
.github/**
2+
dev/.rat-excludes
63
uv.lock
7-
mkdocs/*
8-
notebooks/*
4+
.ruff_cache/**
5+
.pytest_cache/**
6+
.mypy_cache/**
7+
mkdocs/**
8+
notebooks/**

dev/check-license

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ else
5858
declare java_cmd=java
5959
fi
6060

61-
export RAT_VERSION=0.16.1
61+
export RAT_VERSION=0.17
6262
export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar
6363
mkdir -p "$FWDIR"/lib
6464

@@ -67,20 +67,12 @@ mkdir -p "$FWDIR"/lib
6767
exit 1
6868
}
6969

70-
mkdir -p build
71-
$java_cmd -jar "$rat_jar" --scan-hidden-directories -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > build/rat-results.txt
70+
$java_cmd -jar "$rat_jar" \
71+
--input-exclude-file "$FWDIR"/dev/.rat-excludes \
72+
--input-exclude-std GIT IDEA MAC \
73+
--input-include-std HIDDEN_DIR \
74+
--output-style missing-headers \
75+
--log-level ERROR \
76+
-- "$FWDIR" || exit 1
7277

73-
if [ $? -ne 0 ]; then
74-
echo "RAT exited abnormally"
75-
exit 1
76-
fi
77-
78-
ERRORS="$(cat build/rat-results.txt | grep -e "??")"
79-
80-
if test ! -z "$ERRORS"; then
81-
echo "Could not find Apache license headers in the following files:"
82-
echo "$ERRORS"
83-
exit 1
84-
else
85-
echo -e "RAT checks passed."
86-
fi
78+
echo "RAT checks passed."

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ dev = [
111111
"typing-extensions==4.15.0",
112112
"pytest-mock==3.15.1",
113113
"pyspark[connect]==4.0.1",
114-
"protobuf==6.33.4", # match Spark Connect's gencode
114+
"protobuf==6.33.5", # match Spark Connect's gencode
115115
"cython>=3.0.0",
116116
"deptry>=0.14,<0.25",
117117
"docutils!=0.21.post1",

tests/integration/test_catalog.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,3 +823,40 @@ def test_drop_nonexistent_namespace(test_catalog: Catalog) -> None:
823823
namespace = ("non_existent_namespace",)
824824
with pytest.raises(NoSuchNamespaceError):
825825
test_catalog.drop_namespace(namespace)
826+
827+
828+
@pytest.mark.integration
829+
@pytest.mark.parametrize("test_catalog", CATALOGS)
830+
def test_rename_table_missing_source_table(test_catalog: Catalog, table_name: str, database_name: str) -> None:
831+
test_catalog.create_namespace_if_not_exists(database_name)
832+
identifier = (database_name, table_name)
833+
new_identifier = (database_name, f"rename-{table_name}")
834+
835+
with pytest.raises(NoSuchTableError):
836+
test_catalog.rename_table(identifier, new_identifier)
837+
838+
839+
@pytest.mark.integration
840+
@pytest.mark.parametrize("test_catalog", CATALOGS)
841+
def test_rename_table_destination_namespace_missing(
842+
test_catalog: Catalog, table_schema_nested: Schema, table_name: str, database_name: str
843+
) -> None:
844+
test_catalog.create_namespace_if_not_exists(database_name)
845+
identifier = (database_name, table_name)
846+
test_catalog.create_table(identifier, table_schema_nested)
847+
848+
new_database_name = "non_existent_namespace"
849+
new_identifier = (new_database_name, table_name)
850+
851+
with pytest.raises(NoSuchNamespaceError):
852+
test_catalog.rename_table(identifier, new_identifier)
853+
854+
855+
@pytest.mark.integration
856+
@pytest.mark.parametrize("test_catalog", CATALOGS)
857+
def test_load_missing_table(test_catalog: Catalog, database_name: str, table_name: str) -> None:
858+
test_catalog.create_namespace_if_not_exists(database_name)
859+
identifier = (database_name, table_name)
860+
861+
with pytest.raises(NoSuchTableError):
862+
test_catalog.load_table(identifier)

uv.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)