Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question #100

Open
Arnold1 opened this issue May 22, 2023 · 0 comments
Open

question #100

Arnold1 opened this issue May 22, 2023 · 0 comments

Comments

@Arnold1
Copy link

Arnold1 commented May 22, 2023

Hi @fraugster @akrennmair @panamafrancis,

I would like to know how to read the following schema with parquet-go?

message spark_schema {
  optional group foo (LIST) {
    repeated group list {
      optional double element;
    }
  }
  required group bar (LIST) {
    repeated group list {
      required double element;
    }
  }
}

the following seems not to work:

type Record struct {
	Foo FooList `parquet:"foo.list"`
	Bar   BarList   `parquet:"bar.list"`
}

type FooList struct {
	List []FooListList `parquet:"list"`
}

type FooListList struct {
	List []float64 `parquet:"element"`
}

type BarList struct {
	List BidValuesListList `parquet:"list"`
}

type BarListList struct {
	List []float64 `parquet:"element"`
}

while this works fine with github.com/segmentio/parquet-go lib:

type Record struct {
	Foo BarList `parquet:"foo"`
	Bar   BarList   `parquet:"bar"`
}

type FooList struct {
	List []FooListList `parquet:"list"`
}

type FooListList struct {
	List []float64 `parquet:"element"`
}

type BarList struct {
	List BarListList `parquet:"list"`
}

type BarListList struct {
	List []float64 `parquet:"element"`
}
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

No branches or pull requests

1 participant