paleolimbot opened a new issue, #105:
URL: https://github.com/apache/sedona-db/issues/105
We can almost certainly do better than what is currently being printed to
communicate result size, particularly where we've limited. For example:
```python
import sedona.db
sd = sedona.db.connect()
sd.sql("SELECT v FROM (VALUES ('a'), ('b'), ('c')) AS
t(v)").limit(100).show()
#> ┌──────┐
#> │ v │
#> │ utf8 │
#> ╞══════╡
#> │ a │
#> ├╌╌╌╌╌╌┤
#> │ b │
#> ├╌╌╌╌╌╌┤
#> │ c │
#> └──────┘
```
A column count might be nice as well, since for very wide output columns get
hidden:
```python
sd.sql(
"SELECT 'foofyfoofyfoofy' AS foofy_foofy_foofy, 1 AS one,
'foofyfoofyfoofy2' AS foofy_foofy_foofy2"
).show(width=25)
#> ┌───┬───────────────────┐
#> │ … ┆ foofy_foofy_foofy │
#> │ ┆ 2… │
#> ╞═══╪═══════════════════╡
#> │ … ┆ foofyfoofyfoofy2 │
#> └───┴───────────────────┘
```
The current workaround is to just look at the `.schema`:
```python
sd.sql(
"SELECT 'foofyfoofyfoofy' AS foofy_foofy_foofy, 1 AS one,
'foofyfoofyfoofy2' AS foofy_foofy_foofy2"
).schema
#> SedonaSchema with 3 fields:
#> foofy_foofy_foofy: non-nullable utf8<Utf8>
#> one: non-nullable int64<Int64>
#> foofy_foofy_foofy2: non-nullable utf8<Utf8>
```
--
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]