I wasn't completely sure about what the proper default length would be for non-FIXED types. The spec has the following comment for SchemaElement.type_length:

    /** If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
      * Otherwise, if specified, this is the maximum bit length to store any of the values.
      * (e.g. a low cardinality INT col could have this set to 3).  Note that this is
      * in the schema, and therefore fixed for the entire file.
      */

The way I interpreted it was that if the field is FLBA, then this field must be specified to indicate the byte length of the field. Otherwise, it is optional, but if it is specified, then it should be the maximum bit length of the field, as you described 4 for i32 and 8 for i64. 

In my changes, I believe I assumed that fields that are not FLBA will not have type_length specified, and thus, plumbing this up, the typeLength in ColumnDescriptor would be 0, though I realize that this is an incorrect assumption because some files may have type_length specified for other primitive types such as i32 and i64.

I will make this change, but I have a few questions:

1. Should the typeLength in ColumnDescriptor be 0 for fields that do not specify a type length in the schema metadata or should we calculate a type length regardless after reading the file?
2. What should this value be for a variable-length field such as string or binary?