json_decode
followed by .struct.field(<fld>)
raises StructFieldNotFoundError
in lazy mode
#21073
Open
2 tasks done
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
🟢 Eager (works)
🔴 Lazy (fails)
Log output
Issue description
Lazy mode raises an error when unpacking a struct field following
json_decode
. Note: disabling the optimiser (.collect(no_optimization=True)
)does not resolve/avoid the error.Expected behavior
Should successfully identify/return the requested struct field, as does eager mode.
Installed versions
--------Version info---------
Polars: 1.21.0
Index type: UInt32
Platform: macOS-15.2-arm64-arm-64bit
Python: 3.12.8 (main, Dec 3 2024, 18:42:41) [Clang 16.0.0 (clang-1600.0.26.4)]
LTS CPU: False
----Optional dependencies----
Azure CLI
adbc_driver_manager 1.4.0
altair
azure.identity
boto3 1.36.3
cloudpickle
connectorx 0.3.3
deltalake
fastexcel 0.12.1
fsspec 2024.12.0
gevent
google.auth 2.37.0
great_tables 0.16.1
matplotlib
numpy 2.0.2
openpyxl
pandas 2.2.3
pyarrow 19.0.0
pydantic 2.9.1
pyiceberg
sqlalchemy 1.4.54
torch 2.5.1
xlsx2csv
xlsxwriter 3.2.2
The text was updated successfully, but these errors were encountered: