abey79 opened a new issue, #1312:
URL: https://github.com/apache/datafusion-python/issues/1312
**Describe the bug**
Keys of a dataframe's schema's metadata containing a `:` character are
displayed in a truncated way. For example `sorbet:version` is displayed as
`version`
**To Reproduce**
This minimal test reproduces the issue:
```python
def test_metadata_display() -> None:
import datafusion
import pyarrow as pa
# Create a minimalistic pyarrow table with metadata
schema = pa.schema([("value", pa.int64())], metadata={"sorbet:version":
"1.0"})
table = pa.table({"value": [1, 2, 3]}, schema=schema)
# Register to a datafusion session context
ctx = datafusion.SessionContext()
ctx.register_record_batches("test_table", [table.to_batches()])
# Get the table from the context and print it
df = ctx.table("test_table")
# This should NOT pass since the metadata key is "sorbet:version", not
"version"
assert (
str(df)
== """\
┌────────────────────────┐
│ METADATA: │
│ * version: 1.0 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ ┌────────────────────┐ │
│ │ value │ │
│ │ --- │ │
│ │ type: nullable i64 │ │
│ ╞════════════════════╡ │
│ │ 1 │ │
│ ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │
│ │ 2 │ │
│ ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │
│ │ 3 │ │
│ └────────────────────┘ │
└────────────────────────┘\
"""
)
```
**Expected behavior**
The metadata key should be displayed in full.
**Additional context**
`datafusion==50.1.0`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]