Skip to content

Commit

Permalink
Remove inName
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Nov 21, 2024
1 parent 60e9f35 commit b8fde48
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions lib/typing/parquet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

type FieldTag struct {
Name string
InName *string
Type *string
ConvertedType *string
ValueConvertedType *string
Expand All @@ -25,10 +24,6 @@ func (f FieldTag) String() string {
fmt.Sprintf("name=%s", f.Name),
}

if f.InName != nil {
//parts = append(parts, fmt.Sprintf("inname=%s", *f.InName))
}

if f.Type != nil {
parts = append(parts, fmt.Sprintf("type=%s", *f.Type))
}
Expand Down Expand Up @@ -73,25 +68,22 @@ func (k *KindDetails) ParquetAnnotation(colName string) (*Field, error) {
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("BYTE_ARRAY"),
ConvertedType: ToPtr("UTF8"),
}.String(),
}, nil
case Float.Kind:
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("FLOAT"),
Name: colName,
Type: ToPtr("FLOAT"),
}.String(),
}, nil
case Integer.Kind, TimestampNTZ.Kind, TimestampTZ.Kind:
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("INT64"),
Name: colName,
Type: ToPtr("INT64"),
}.String(),
}, nil
case EDecimal.Kind:
Expand All @@ -100,7 +92,6 @@ func (k *KindDetails) ParquetAnnotation(colName string) (*Field, error) {
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("BYTE_ARRAY"),
ConvertedType: ToPtr("UTF8"),
}.String(),
Expand All @@ -110,7 +101,6 @@ func (k *KindDetails) ParquetAnnotation(colName string) (*Field, error) {
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("BYTE_ARRAY"),
ConvertedType: ToPtr("DECIMAL"),
Precision: ToPtr(int(precision)),
Expand All @@ -120,16 +110,14 @@ func (k *KindDetails) ParquetAnnotation(colName string) (*Field, error) {
case Boolean.Kind:
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("BOOLEAN"),
Name: colName,
Type: ToPtr("BOOLEAN"),
}.String(),
}, nil
case Array.Kind:
return &Field{
Tag: FieldTag{
Name: colName,
InName: &colName,
Type: ToPtr("LIST"),
RepetitionType: ToPtr("REQUIRED"),
}.String(),
Expand Down

0 comments on commit b8fde48

Please sign in to comment.