This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 9d768b7ba9 refactor(pyamber): remove the unused FROM_PYOBJECT_MAPPING
(#8904)
9d768b7ba9 is described below
commit 9d768b7ba9c274eb1a2980162af4cda6ef6327ba
Author: Matthew B. <[email protected]>
AuthorDate: Wed Oct 7 10:06:49 2026 +0000
refactor(pyamber): remove the unused FROM_PYOBJECT_MAPPING (#8904)
### What changes were proposed in this PR?
- Remove the unused `FROM_PYOBJECT_MAPPING` dict from
`core/models/schema/attribute_type.py`.
- It is referenced nowhere in the repo and is not exported; only its
sibling `TO_PYOBJECT_MAPPING` is actually imported and used (in
`core/models/tuple.py`). The `# Only single-directional mapping.`
comment stays with `TO_PYOBJECT_MAPPING`.
### Any related issues, documentation, discussions?
Closes: #8903
### How was this PR tested?
- Non-functional change (dead module-level dict removal); no behavior
changes, so no test added.
- Confirm no references remain: run `rg -n "FROM_PYOBJECT_MAPPING"` and
expect no hits after removal.
- Verify formatting from `amber/`: `ruff format --check
src/main/python/core/models/schema/attribute_type.py`.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF
---
amber/src/main/python/core/models/schema/attribute_type.py | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/amber/src/main/python/core/models/schema/attribute_type.py
b/amber/src/main/python/core/models/schema/attribute_type.py
index 0887816c82..39cfdd4d98 100644
--- a/amber/src/main/python/core/models/schema/attribute_type.py
+++ b/amber/src/main/python/core/models/schema/attribute_type.py
@@ -134,16 +134,6 @@ TO_PYOBJECT_MAPPING = {
AttributeType.LARGE_BINARY: largebinary,
}
-FROM_PYOBJECT_MAPPING = {
- str: AttributeType.STRING,
- int: AttributeType.INT,
- float: AttributeType.DOUBLE,
- bool: AttributeType.BOOL,
- bytes: AttributeType.BINARY,
- datetime.datetime: AttributeType.TIMESTAMP,
- largebinary: AttributeType.LARGE_BINARY,
-}
-
# Signed value ranges within which an integral float can be safely cast back
# to int. INT is bounded by Arrow int32 capacity. LONG is bounded by the
# float64 exact-integer window rather than int64 capacity: above 2**53 float64