diff --git a/README.md b/README.md index 61d06a69..0cb155b6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/common/common.go b/common/common.go index 3859c24b..32c7a70a 100644 --- a/common/common.go +++ b/common/common.go @@ -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 {