takacsd

Results 17 comments of takacsd

If I do `cast(col, BINARY)` it gets converted to `CAST("colname" AS VARBINARY)` and is working fine. but if I do `cast(col, VARBINARY)` it gets converted to `CAST("colname" AS BINARY)` which...

Perfect, thanks for the quick response!

Run into the same issue: ```py df = pd.DataFrame({'a': pd.Series([['a'], ['a', 'b']], dtype=pd.ArrowDtype(pa.list_(pa.string())))}) df.to_parquet('test.parquet') # SUCCESS pd.read_parquet('test.parquet') # *** FAIL df.to_parquet('test.parquet') # SUCCESS pq.read_table('test.parquet').to_pandas(ignore_metadata=True, types_mapper=pd.ArrowDtype) # SUCCESS df.to_parquet('test.parquet', store_schema=False) #...

@danielhanchen I think the problem is in the pandas specific metadata. If the parquet file was created with something else (e.g.: AWS Athena) it could read it just fine. ```py...

> The main issue I think is because`dtype` is a string I guess. I'm not 100% sure about how `_pandas_api.pandas_dtype` works, but presumably it's a large `dict` mapping types in...

@danielhanchen your approach only works here, and it just ignores the metadata. I'm not a pandas developer but I suppose they generated that metadata for a reason, so it may...

Yeah, after some experimenting, I think we need to gave up on parsing the type string: These two: ```py pd.Series([{'a': 1, 'b': 1}], dtype=pd.ArrowDtype(pa.struct({'a': pa.int64(), 'b': pa.int64()}))) pd.Series([{'a: int64, b':...

I was bored: ```py class ParseFail(Exception): pass class Parsed(NamedTuple): type: pa.DataType end: int class TypeStringParser: BASIC_TYPE_MATCHER = re.compile(r'\w+(\[[^\]]+\])?') TIMESTAMP_MATCHER = re.compile(r'timestamp\[([^,]+), tz=([^\]]+)\]') NAME_MATCHER = re.compile(r'\w+') # this can be r'[^:]'...