parquet-go icon indicating copy to clipboard operation
parquet-go copied to clipboard

Question: how to add custom type as a member field that is not a list?

Open danielo-golangieli opened this issue 1 year ago • 1 comments

Hello, I've been trying to make a custom type as field work, looking up examples etc, but no examples as such and could not figure it out. What to use as type in the parquet tag? For example:

type A struct {
    Name string `parquet:"name=name, type=UTF8"`
}

type B struct {
    ID int64 `parquet:"name=id, type=INT64"`
    SubA A `parquet:"name=suba, type=???"`
}

Also not sure how to provide the type in the json schema definition when using that. Thanks.

danielo-golangieli avatar May 09 '23 14:05 danielo-golangieli

Something like SubA A parquet:"name=LIST, type=STRUCT"`, I didn't test though.

hangxie avatar May 23 '23 03:05 hangxie