Skip to content

fix: YearTransform passes wrong TransformType kTruncate instead of kYear - #715

Merged
wgtmac merged 1 commit into
apache:mainfrom
WZhuo:fix/year-transform-type
Jun 10, 2026
Merged

fix: YearTransform passes wrong TransformType kTruncate instead of kYear#715
wgtmac merged 1 commit into
apache:mainfrom
WZhuo:fix/year-transform-type

Conversation

@WZhuo

@WZhuo WZhuo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Bug: YearTransform constructor passed TransformType::kTruncate to the TransformFunction base class instead of TransformType::kYear. This caused transform_type() to return kTruncate on a bound YearTransform, affecting code paths that dispatch based on transform_type() (e.g., Transform::Project, Transform::ProjectStrict, Transform::SatisfiesOrderOf).

Fix: Changed kTruncate to kYear in the YearTransform constructor.

Tests: Added TransformFunctionTest cases for Year, Month, Day, Hour, and Void transforms to verify transform_type() after Bind(). The existing suite only tested Identity, Bucket, and Truncate.

@zhjwpku zhjwpku left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good catch.

@wgtmac
wgtmac merged commit 3fd8a49 into apache:main Jun 10, 2026
18 checks passed
@WZhuo
WZhuo deleted the fix/year-transform-type branch July 2, 2026 06:08
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.

3 participants