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

HCK-7254: fix FE script generation for the time unit partitioning using DATE type column #59

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

dannleed
Copy link
Contributor

@dannleed dannleed commented Jul 16, 2024

Sub-bugHCK-7254 Fix BigQuery time-unit column partitioning FE script generation for the columns with DATE type

Context

Time-unit column partitioning is suitable for the DATE, TIMESTAMP, or DATETIME columns within a table. For more details, refer to the documentation.

When defining a partition expression, ensure that columns of type TIMESTAMP or DATETIME are enclosed within the DATE() function. On the other hand, if you're using columns of type DATE, there's no need to include this wrapping function. (documentation)

Technical details

To handle partitioning expressions for different column types, I created a helper function. This function generates the appropriate expression based on the type of column.

@dannleed dannleed requested a review from chulanovskyi-bs July 16, 2024 13:19
@dannleed dannleed self-assigned this Jul 16, 2024
@chulanovskyi-bs chulanovskyi-bs added this pull request to the merge queue Jul 16, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 16, 2024
Copy link

@dannleed dannleed enabled auto-merge July 16, 2024 15:22
@dannleed dannleed requested a review from chulanovskyi-bs July 16, 2024 15:34
@dannleed dannleed added this pull request to the merge queue Jul 16, 2024
Merged via the queue into develop with commit 70ab5fa Jul 16, 2024
3 checks passed
@dannleed dannleed deleted the fix/HCK-7254-time-unit-column-partitioning branch July 16, 2024 15:57
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