Skip to content

Fix: Make start and end macros produce different hashes #4844

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MikeWallis42
Copy link
Contributor

Fixes #3500

Prior to this, as they have the same default value, if only 1 is used and then changed that would not result in a new data_hash and therefor would not be considered a breaking change when planning.

I'm fully aware that this may need a migration script, please let me know if so as I might need some assistance.

@@ -990,6 +990,7 @@ def test_environment_statements_config(tmp_path):
def test_pydantic_import_error() -> None:
class TestConfig(DuckDBConnectionConfig):
pass
TestConfig.model_rebuild()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to fix a local issue here but didn't completely fix it.

@@ -173,7 +174,7 @@ def _resolve_table(table: str | exp.Table) -> str:
)

start_time, end_time = (
make_inclusive(start or c.EPOCH, end or c.EPOCH, self._dialect)
make_inclusive(start or c.EPOCH, end or c.EPOCH + timedelta(days=1), self._dialect)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the only place where we use epoch as a placeholder. I wonder whether we should instead have 3 constants:

START_PLACEHOLDER
END_PLACEHOLDER
EXECUTION_TIME_PLACEHOLDER

and use these instead throughout.

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.

Date Macros result in same Data Hash
2 participants