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 new tables #27

Merged
merged 4 commits into from
Jan 12, 2023
Merged

Add new tables #27

merged 4 commits into from
Jan 12, 2023

Conversation

wjones127
Copy link
Collaborator

@wjones127 wjones127 commented Nov 18, 2022

Description

Will rebase after #25 is merged.

How was this patch tested?

Does this require an update to the documentation?

Makefile Outdated
@@ -25,7 +25,8 @@ lint-bandit: ## Run bandit
@echo "\n${BLUE}Running bandit...${NC}\n"
@${POETRY_RUN} bandit -r ${PROJ}

lint-base: lint-flake8 lint-bandit ## Just run the linters without autolinting
#lint-base: lint-flake8 lint-bandit ## Just run the linters without autolinting
lint-base: lint-flake8 # TODO: Can we drop bandit?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@edmondop is there a compelling reason to include bandit in this project? I found it was giving irrelevant warnings and since this project doesn't deal in any non-public data, it's unclear to me why we care that much about security.

@MrPowers MrPowers self-requested a review November 21, 2022 16:07
@wjones127
Copy link
Collaborator Author

There are some test failures. I'll be on vacation for a week, so won't get around to finishing this until around December 20.

@MrPowers
Copy link
Collaborator

MrPowers commented Dec 9, 2022

@wjones127 - alright cool, have a nice vacation!! Let's finish this up and get it merged when you're back!

@@ -35,7 +40,7 @@ def save_expected(case: TestCaseInfo, as_latest=False) -> None:
# Need to ensure directory exists first
os.makedirs(case.expected_root(version))

df.toPandas().to_parquet(case.expected_path(version))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It turned out toPandas().to_parquet() causes weird things to happen to timestamps, so better to stick to Spark here. Without this, I was able to eliminate the pandas dependency as well.

def create_nested_types(case: TestCaseInfo, spark: SparkSession):
schema = types.StructType([
types.StructField(
'pk', types.IntegerType()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

chispa doesn't support ignoring sort order when comparing tables that contain map types, so we have to add a pk column that tests can sort on. I've added a note about this to the readme.

@wjones127 wjones127 marked this pull request as ready for review December 20, 2022 21:32
@wjones127 wjones127 merged commit 59a47b6 into delta-incubator:master Jan 12, 2023
@wjones127 wjones127 deleted the new-tables branch January 12, 2023 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants