Skip to content

Conversation

jorisvandenbossche
Copy link
Member

I was testing locally with https://github.com/OSGeo/gdal/blob/master/autotest/ogr/data/arrow/test.feather, and that includes a bunch of fields with unsupported types, and that actually raises errors because of None being present in the fields (where we expect a integer for the index or a string for the field name)

(just quickly pushing here instead of opening a bug report)

@brendan-ward
Copy link
Member

Do we want to raise a warning about unsupported fields?

@jorisvandenbossche
Copy link
Member Author

GDAL already prints a warning for this:

In [3]: pyogrio.read_dataframe("../Downloads/test.feather")
Skipping field time32_s: unsupported OGR type: 10
Skipping field time32_ms: unsupported OGR type: 10
Skipping field list_boolean: unsupported OGR type: 1
Skipping field list_uint8: unsupported OGR type: 1
Skipping field list_int8: unsupported OGR type: 1
Skipping field list_uint16: unsupported OGR type: 1
Skipping field list_int16: unsupported OGR type: 1
Skipping field list_uint32: unsupported OGR type: 13
Skipping field list_int32: unsupported OGR type: 1
Skipping field list_uint64: unsupported OGR type: 3
Skipping field list_int64: unsupported OGR type: 13
Skipping field list_float32: unsupported OGR type: 3
Skipping field list_float64: unsupported OGR type: 3
Skipping field list_string: unsupported OGR type: 5
Skipping field fixed_size_list_boolean: unsupported OGR type: 1
Skipping field fixed_size_list_uint8: unsupported OGR type: 1
Skipping field fixed_size_list_int8: unsupported OGR type: 1
Skipping field fixed_size_list_uint16: unsupported OGR type: 1
Skipping field fixed_size_list_int16: unsupported OGR type: 1
Skipping field fixed_size_list_uint32: unsupported OGR type: 13
Skipping field fixed_size_list_int32: unsupported OGR type: 1
Skipping field fixed_size_list_uint64: unsupported OGR type: 3
Skipping field fixed_size_list_int64: unsupported OGR type: 13
Skipping field fixed_size_list_float32: unsupported OGR type: 3
Skipping field fixed_size_list_float64: unsupported OGR type: 3
Skipping field fixed_size_list_string: unsupported OGR type: 5
Skipping field struct_field.h: unsupported OGR type: 13
Out[3]: 
   boolean  uint8  int8   uint16    int16        uint32  ...                      map_int64         map_float32         map_float64              map_string  dict                 geometry
0      1.0    1.0  -2.0      1.0 -20000.0  1.000000e+00  ...  {"x":-2000000000000,"y":null}  {"x":1.5,"y":null}  {"x":1.5,"y":null}  {"x":"x_val","y":null}   0.0  POINT (0.00000 2.00000)
1      0.0    2.0  -1.0  10001.0 -10000.0  1.000000e+09  ...                        {"z":3}           {"z":3.0}           {"z":3.0}           {"z":"z_val"}   1.0                     None
2      NaN    NaN   NaN      NaN      NaN           NaN  ...                           None                None                None                    None   2.0  POINT (2.00000 2.00000)
3      0.0    4.0   1.0  30001.0  10000.0  3.000000e+09  ...                             {}                  {}                  {}                      {}   NaN  POINT (3.00000 2.00000)
4      1.0    5.0   2.0  40001.0  20000.0  4.000000e+09  ...                             {}                  {}                  {}                      {}   2.0  POINT (4.00000 2.00000)

[5 rows x 45 columns]

@jorisvandenbossche jorisvandenbossche marked this pull request as ready for review June 2, 2022 16:15
Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendan-ward brendan-ward merged commit 9ac6df5 into geopandas:main Jun 2, 2022
@jorisvandenbossche jorisvandenbossche deleted the fix-skipped-fields-unsupported-types branch June 3, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants