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

Update Parquet binaryAsString integration to use a static parquet file #5845

Merged

Conversation

NVnavkumar
Copy link
Collaborator

Fixes #5837.

This updates the parquet integration test which tests the functionality of spark.sql.parquet.binaryAsString=true in the plugin to use a static file, so that integration test can run on clustered environments which only have access to HDFS.

Signed-off-by: Navin Kumar navink@nvidia.com

Steps to create the binary as string parquet file (in Python):

import random

import sre_yield
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq

base_strings = sre_yield.AllStrings("(.|\n){1,30}", flags=0, charset=sre_yield.CHARSET, max_count=(1 << 64)
strings = [base_strings[random.randint(0, (1 << 64))] for i in range(500)]
records = [(i, s.encode(), s) for i, s in enumerate(strings)]
df = pd.DataFrame.from_records(records)
pq.write_table(pa.Table.from_pandas(df), 'binary_as_string.parquet')

…lly with pyarrow

Signed-off-by: Navin Kumar <navink@nvidia.com>
@NVnavkumar NVnavkumar requested a review from tgravescs June 15, 2022 21:12
@NVnavkumar NVnavkumar self-assigned this Jun 15, 2022
@NVnavkumar
Copy link
Collaborator Author

build

1 similar comment
@NVnavkumar
Copy link
Collaborator Author

build

@jlowe jlowe added the test Only impacts tests label Jun 15, 2022
Copy link
Contributor

@jlowe jlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with using a pre-built file to fix the broken nightly build, but shouldn't we be able to create files locally by using the file: schema explicitly? That could be investigated in a followup.

@jlowe jlowe added this to the Jun 6 - Jun 17 milestone Jun 15, 2022
@NVnavkumar
Copy link
Collaborator Author

NVnavkumar commented Jun 15, 2022

I'm OK with using a pre-built file to fix the broken nightly build, but shouldn't we be able to create files locally by using the file: schema explicitly? That could be investigated in a followup.

The fundamental issue here was that the integration tests broke running on a cluster (YARN). I think it makes sense if we can set up the test environment to make it easier to create files on the shared HDFS that the Spark executors would have access to.

@NVnavkumar NVnavkumar merged commit 40d363f into NVIDIA:branch-22.08 Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Only impacts tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] test_parquet_read_round_trip_binary_as_string failures on YARN and Dataproc
2 participants