Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xitongsys authored and durango committed Apr 14, 2021
1 parent e2758ab commit e17b417
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ md := []string{

[Example of CSV metadata](https://github.com/xitongsys/parquet-go/blob/master/example/csv_write.go)

### Tips

* Parquet-go reads data as an object in Golang and every field must be a public field, which start with an upper letter. This field name we call it `InName`. Field name in parquet file we call it `ExName`. Function `common.HeadToUpper` converts `ExName` to `InName`. There are some restriction:
1. It's not allowed if two field names are only different at their first letter case. Such as `name` and `Name`.
2. `PARGO_PREFIX_` is a reserved string, which you'd better not use it as a name prefix. ([#294](https://github.com/xitongsys/parquet-go/issues/294))

## Parallel

Read/Write initial functions have a parallel parameters np which is the number of goroutines in reading/writing.
Expand Down
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func HeadToUpper(str string) string {
return strings.ToUpper(str[0:1]) + str[1:]
}
//handle non-alpha prefix such as "_"
return "P_" + str
return "PARGO_PREFIX_" + str
}

func CmpIntBinary(as string, bs string, order string, signed bool) bool {
Expand Down

0 comments on commit e17b417

Please sign in to comment.