Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in basic support to read structs from parquet #1132

Merged
merged 1 commit into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion integration_tests/src/main/python/parquet_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def read_parquet_sql(data_path):
TimestampGen(start=datetime(1900, 1, 1, tzinfo=timezone.utc)), ArrayGen(byte_gen),
ArrayGen(long_gen), ArrayGen(string_gen), ArrayGen(date_gen),
ArrayGen(TimestampGen(start=datetime(1900, 1, 1, tzinfo=timezone.utc))),
ArrayGen(ArrayGen(byte_gen))],
ArrayGen(ArrayGen(byte_gen)),
StructGen([['child0', ArrayGen(byte_gen)], ['child1', byte_gen], ['child2', float_gen]]),
ArrayGen(StructGen([['child0', string_gen], ['child1', double_gen], ['child2', int_gen]]))],
pytest.param([timestamp_gen], marks=pytest.mark.xfail(reason='https://github.com/NVIDIA/spark-rapids/issues/132'))]

# test with original parquet file reader, the multi-file parallel reader for cloud, and coalesce file reader for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Spark300Shims extends SparkShims {
GpuOverrides.isSupportedType(t,
allowArray = true,
allowStringMaps = true,
allowStruct = true,
allowNesting = true)

// partition filters and data filters are not run on the GPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class Spark300dbShims extends Spark300Shims {
GpuOverrides.isSupportedType(t,
allowArray = true,
allowStringMaps = true,
allowStruct = true,
allowNesting = true)

// partition filters and data filters are not run on the GPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class Spark301dbShims extends Spark301Shims {
GpuOverrides.isSupportedType(t,
allowArray = true,
allowStringMaps = true,
allowStruct = true,
allowNesting = true)

// partition filters and data filters are not run on the GPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class Spark310Shims extends Spark301Shims {
GpuOverrides.isSupportedType(t,
allowArray = true,
allowStringMaps = true,
allowStruct = true,
allowNesting = true)

// partition filters and data filters are not run on the GPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@ object GpuOverrides {
GpuOverrides.isSupportedType(t,
allowStringMaps = true,
allowArray = true,
allowStruct = true,
allowNesting = true)

override def convertToGpu(): GpuExec =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ object GpuParquetScanBase {
field.dataType,
allowStringMaps = true,
allowArray = true,
allowStruct = true,
allowNesting = true)) {
meta.willNotWorkOnGpu(s"GpuParquetScan does not support fields of type ${field.dataType}")
}
Expand Down