hi, i'm using parquet-go with JSON input records.
eacn JSON columns convert to appropriate parquet type by StrToParquetType with fmt.Sscanf function.
but this conversion ignores fmt.Sscanf errors.
for example, when we define an integer column in parquet schema and actual JSON value is a string "abc", we get the record value 0.
func main() {
var str = "abc"
var v int32
n, err := fmt.Sscanf(str, "%d", &v)
fmt.Println(v)
fmt.Println(err)
}
gets result below.
0
expected integer
in my opinion, this behavior is weird for developers and wanna catch cases like this.
hi, i'm using parquet-go with JSON input records. eacn JSON columns convert to appropriate parquet type by
StrToParquetType
withfmt.Sscanf
function.but this conversion ignores
fmt.Sscanf
errors. for example, when we define an integer column in parquet schema and actual JSON value is a string "abc", we get the record value0
.gets result below.
in my opinion, this behavior is weird for developers and wanna catch cases like this.