Skip to content

Commit bd6fa37

Browse files
xitongsysdurango
authored andcommitted
1 parent 2a6e340 commit bd6fa37

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ md := []string{
305305

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

308+
### Tips
309+
310+
* 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:
311+
1. It's not allowed if two field names are only different at their first letter case. Such as `name` and `Name`.
312+
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))
313+
308314
## Parallel
309315

310316
Read/Write initial functions have a parallel parameters np which is the number of goroutines in reading/writing.

common/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func HeadToUpper(str string) string {
321321
return strings.ToUpper(str[0:1]) + str[1:]
322322
}
323323
//handle non-alpha prefix such as "_"
324-
return "P_" + str
324+
return "PARGO_PREFIX_" + str
325325
}
326326

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

0 commit comments

Comments
 (0)