From 0b6e59970cd19670a92e80e89e46a87a5d2698a0 Mon Sep 17 00:00:00 2001 From: Firestarman Date: Wed, 13 Oct 2021 14:59:29 +0800 Subject: [PATCH] New map gens for orc write Try to fix a build error in premerge builds which running tests in parallel. Signed-off-by: Firestarman --- integration_tests/src/main/python/orc_write_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration_tests/src/main/python/orc_write_test.py b/integration_tests/src/main/python/orc_write_test.py index b9acf238d21..37227ccbeff 100644 --- a/integration_tests/src/main/python/orc_write_test.py +++ b/integration_tests/src/main/python/orc_write_test.py @@ -18,7 +18,6 @@ from datetime import date, datetime, timezone from data_gen import * from marks import * -from orc_test import orc_basic_map_gens as orc_write_basic_map_gens from pyspark.sql.types import * orc_write_basic_gens = [byte_gen, short_gen, int_gen, long_gen, float_gen, double_gen, @@ -37,6 +36,11 @@ ArrayGen(ArrayGen(string_gen, max_length=10), max_length=10), ArrayGen(StructGen([['child0', byte_gen], ['child1', string_gen], ['child2', float_gen]]))] +orc_write_basic_map_gens = [simple_string_to_string_map_gen] + [MapGen(f(nullable=False), f()) for f in [ + BooleanGen, ByteGen, ShortGen, IntegerGen, LongGen, FloatGen, DoubleGen, + lambda nullable=True: TimestampGen(start=datetime(1900, 1, 1, tzinfo=timezone.utc), nullable=nullable), + lambda nullable=True: DateGen(start=date(1590, 1, 1), nullable=nullable)]] + orc_write_gens_list = [orc_write_basic_gens, orc_write_struct_gens_sample, orc_write_array_gens_sample,