Skip to content

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Jun 7, 2023

Before this PR:

  • "Generate serialized plans file" with GEN_PLAN_STORAGE set generated test/api/serialized_plans/serialized_plans.binary
  • "Generate serialized plans file" without GEN_PLAN_STORAGE did nothing
  • "Test deserialized plans from file" tested against test/api/serialized_plans/serialized_plans.binary

Afterwards

  • "Generate serialized plans file" with GEN_PLAN_STORAGE set generates test/api/serialized_plans/serialized_plans.binary AND test it's deserialization
  • "Generate serialized plans file" without GEN_PLAN_STORAGE generates test/api/serialized_plans/serialized_plans.temp.binary AND test it's deserialization
  • "Test deserialized plans from file" tests against test/api/serialized_plans/serialized_plans.binary

Basically always rountrip test in "Generate serialized plans file" (either on real or temp file) and the same as before in "Test deserialized plans from file".
Also test on generation is run as part of serialization suite.
Main logic should be the same that @bleskes originally committed with minor refactoring.

@carlopi carlopi force-pushed the test_plan_serialization branch 2 times, most recently from 452da4e to 2335203 Compare June 7, 2023 12:42
carlopi added 2 commits June 8, 2023 09:44
…rialization

Generation test is now a roundtrip test, either on ignored temporary file OR on
file to be actually committed (if run with GEN_PLAN_STORAGE environment set, either
manually or via `python3 scripts/generate_plan_storage_version.py`
Now we don't have a temp file hanging anymore
@carlopi carlopi force-pushed the test_plan_serialization branch from 2335203 to c7b9435 Compare June 8, 2023 07:44
Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@carlopi
Copy link
Contributor Author

carlopi commented Jun 8, 2023

@Mytherin Mytherin merged commit 2714bd3 into duckdb:master Jun 8, 2023
@carlopi carlopi deleted the test_plan_serialization branch June 13, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants