arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neal Richardson (Jira)" <j...@apache.org>
Subject [jira] [Created] (ARROW-7063) [C++] Schema print method prints too much metadata
Date Mon, 04 Nov 2019 23:18:00 GMT
Neal Richardson created ARROW-7063:
--------------------------------------

             Summary: [C++] Schema print method prints too much metadata
                 Key: ARROW-7063
                 URL: https://issues.apache.org/jira/browse/ARROW-7063
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++, C++ - Dataset
            Reporter: Neal Richardson
             Fix For: 1.0.0


I loaded some taxi data in a Dataset and printed the schema. This is what was printed:

{code}
vendor_id: string
pickup_at: timestamp[us]
dropoff_at: timestamp[us]
passenger_count: int8
trip_distance: float
pickup_longitude: float
pickup_latitude: float
rate_code_id: null
store_and_fwd_flag: string
dropoff_longitude: float
dropoff_latitude: float
payment_type: string
fare_amount: float
extra: float
mta_tax: float
tip_amount: float
tolls_amount: float
total_amount: float
-- metadata --
pandas: {"index_columns": [{"kind": "range", "name": null, "start": 0, "stop": 14387371, "step":
1}], "column_indexes": [{"name": null, "field_name": null, "pandas_type": "unicode", "numpy_type":
"object", "metadata": {"encoding": "UTF-8"}}], "columns": [{"name": "vendor_id", "field_name":
"vendor_id", "pandas_type": "unicode", "numpy_type": "object", "metadata": null}, {"name":
"pickup_at", "field_name": "pickup_at", "pandas_type": "datetime", "numpy_type": "datetime64[ns]",
"metadata": null}, {"name": "dropoff_at", "field_name": "dropoff_at", "pandas_type": "datetime",
"numpy_type": "datetime64[ns]", "metadata": null}, {"name": "passenger_count", "field_name":
"passenger_count", "pandas_type": "int8", "numpy_type": "int8", "metadata": null}, {"name":
"trip_distance", "field_name": "trip_distance", "pandas_type": "float32", "numpy_type": "float32",
"metadata": null}, {"name": "pickup_longitude", "field_name": "pickup_longitude", "pandas_type":
"float32", "numpy_type": "float32", "metadata": null}, {"name": "pickup_latitude", "field_name":
"pickup_latitude", "pandas_type": "float32", "numpy_type": "float32", "metadata": null}, {"name":
"rate_code_id", "field_name": "rate_code_id", "pandas_type": "empty", "numpy_type": "object",
"metadata": null}, {"name": "store_and_fwd_flag", "field_name": "store_and_fwd_flag", "pandas_type":
"unicode", "numpy_type": "object", "metadata": null}, {"name": "dropoff_longitude", "field_name":
"dropoff_longitude", "pandas_type": "float32", "numpy_type": "float32", "metadata": null},
{"name": "dropoff_latitude", "field_name": "dropoff_latitude", "pandas_type": "float32", "numpy_type":
"float32", "metadata": null}, {"name": "payment_type", "field_name": "payment_type", "pandas_type":
"unicode", "numpy_type": "object", "metadata": null}, {"name": "fare_amount", "field_name":
"fare_amount", "pandas_type": "float32", "numpy_type": "float32", "metadata": null}, {"name":
"extra", "field_name": "extra", "pandas_type": "float32", "numpy_type": "float32", "metadata":
null}, {"name": "mta_tax", "field_name": "mta_tax", "pandas_type": "float32", "numpy_type":
"float32", "metadata": null}, {"name": "tip_amount", "field_name": "tip_amount", "pandas_type":
"float32", "numpy_type": "float32", "metadata": null}, {"name": "tolls_amount", "field_name":
"tolls_amount", "pandas_type": "float32", "numpy_type": "float32", "metadata": null}, {"name":
"total_amount", "field_name": "total_amount", "pandas_type": "float32", "numpy_type": "float32",
"metadata": null}], "creator": {"library": "pyarrow", "version": "0.15.1"}, "pandas_version":
"0.25.3"}
ARROW:schema: /////3gOAAAQAAAAAAAKAA4ABgAFAAgACgAAAAABAwAQAAAAAAAKAAwAAAAEAAgACgAAAFQKAAAEAAAAAQAAAAwAAAAIAAwABAAIAAgAAAAsCgAABAAAAB8KAAB7ImluZGV4X2NvbHVtbnMiOiBbeyJraW5kIjogInJhbmdlIiwgIm5hbWUiOiBudWxsLCAic3RhcnQiOiAwLCAic3RvcCI6IDE0Mzg3MzcxLCAic3RlcCI6IDF9XSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV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8AAAEKIAAAABQAAAAEAAAAAAAAAAAABgAIAAYABgAAAAAAAwAJAAAAcGlja3VwX2F0AAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAEFGAAAABAAAAAEAAAAAAAAAAQABAAEAAAACQAAAHZlbmRvcl9pZAAAAA==
{code}

I'd argue that extra metadata, if it's not part of the Arrow format and can be whatever an
application wants to put in there, should not be printed as part of the schema's ToString
method. It should be viewable some way, just not always. And IDK what to do with this {{ARROW:schema:
}} business but it's clearly not readable as is.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message