tree: 8553a5b29fe23a488b0c54c006d2ebe9fb5cba75
  1. alltypes_dictionary.avro
  2. alltypes_nulls_plain.avro
  3. alltypes_plain.avro
  4. alltypes_plain.bzip2.avro
  5. alltypes_plain.snappy.avro
  6. alltypes_plain.xz.avro
  7. alltypes_plain.zstandard.avro
  8. binary.avro
  9. datapage_v2.snappy.avro
  10. dict-page-offset-zero.avro
  11. duration_uuid.avro
  12. fixed256_decimal.avro
  13. fixed_length_decimal.avro
  14. fixed_length_decimal_legacy.avro
  15. fixed_length_decimal_legacy_32.avro
  16. int128_decimal.avro
  17. int256_decimal.avro
  18. int32_decimal.avro
  19. int64_decimal.avro
  20. list_columns.avro
  21. nested_lists.snappy.avro
  22. nested_records.avro
  23. nonnullable.impala.avro
  24. nullable.impala.avro
  25. nulls.snappy.avro
  26. README.md
  27. repeated_no_annotation.avro
  28. simple_enum.avro
  29. simple_fixed.avro
  30. single_nan.avro
  31. timestamp_logical_types.avro
  32. zero_byte.avro
data/avro/README.md

This directory contains AVRO files corresponding to the parquet testing files at https://github.com/apache/parquet-testing/blob/master/data/

These files were created by using spark using the commands from https://gist.github.com/Igosuki/324b011f40185269d3fc552350d21744

Roughly:

import com.github.mrpowers.spark.daria.sql.DariaWriters
import org.apache.hadoop.fs.FileSystem
import org.apache.hadoop.fs.Path
import org.apache.hadoop.conf.Configuration 
import org.apache.commons.io.FilenameUtils

val fileGlobs = sc.getConf.get("spark.driver.globs")
val dest = sc.getConf.get("spark.driver.out")

val fs = FileSystem.get(new Configuration(true));
val status = fs.globStatus(new Path(fileGlobs))
for (fileStatus <- status) {
    val path = fileStatus.getPath().toString()
    try {
        val dfin = spark.read.format("parquet").load(path)
        val fileName = fileStatus.getPath().getName();
        val fileNameWithOutExt = FilenameUtils.removeExtension(fileName);
        val destination = s"${dest}/${fileNameWithOutExt}.avro"
        println(s"Converting $path to avro at $destination")
        DariaWriters.writeSingleFile(
            df = dfin,
            format = "avro",
            sc = spark.sparkContext,
            tmpFolder = s"/tmp/dw/${fileName}",
            filename = destination
        )
    } catch {
        case e: Throwable => println(s"failed to convert $path : ${e.getMessage}")
    }
}

Additional notes:

FileDescription
alltypes_nulls_plain.avroContains a single row with null values for each scalar data type, i.e, {"string_col":null,"int_col":null,"bool_col":null,"bigint_col":null,"float_col":null,"double_col":null,"bytes_col":null}. Generated from https://gist.github.com/nenorbot/5a92e24f8f3615488f75e2a18a105c76
nested_records.avroContains two rows of nested record types. Generated from https://github.com/sarutak/avro-data-generator/blob/master/src/bin/nested-records.rs
simple_enum.avroContains four rows of enum types. Generated from https://github.com/sarutak/avro-data-generator/blob/master/src/bin/simple-enum.rs
simple_fixedContains two rows of fixed types. Generated from https://github.com/sarutak/avro-data-generator/blob/master/src/bin/simple-fixed.rs
zero_byte.avroContains two rows of zero bytes followed by a non-zero byte row. Generated from https://gist.github.com/jecsand838/e57647d0d12853f3cf07c350a6a40395
duration_uuid.avroContains four rows of uuid and duration logic types. Generated from https://gist.github.com/jecsand838/cbdaaf581af78f357778bf87d2f3cf15
fixed256_decimal.avroGenerated from https://gist.github.com/jecsand838/3890349bdb33082a3e8fdcae3257eef7
fixed_length_decimal_legacy_32.avroGenerated from https://gist.github.com/jecsand838/3890349bdb33082a3e8fdcae3257eef7
int128_decimal.avroGenerated from https://gist.github.com/jecsand838/3890349bdb33082a3e8fdcae3257eef7
int256_decimal.avroGenerated from https://gist.github.com/jecsand838/3890349bdb33082a3e8fdcae3257eef7
timestamp_logical_types.avroContains two rows with timestamp-* and local-timestamp-* logical types for millis/micros/nanos.