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

test: Add InputGenerator for TimestampWithTimeZone #12481

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

Conversation

kevinwilfong
Copy link
Contributor

Summary:
This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone
type. It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 28, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

Copy link

netlify bot commented Feb 28, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit ccfae3e
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67c2217ce10a7300084aacf2

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
…#12481)

Summary:

This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone 
type.  It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

Comment on lines +14 to +17
velox_add_library(velox_presto_types_fuzzer_utils
TimestampWithTimeZoneInputGenerator.cpp)

velox_link_libraries(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
velox_add_library(velox_presto_types_fuzzer_utils
TimestampWithTimeZoneInputGenerator.cpp)
velox_link_libraries(
add_library(velox_presto_types_fuzzer_utils
TimestampWithTimeZoneInputGenerator.cpp)
target_link_libraries(

A fuzzer util library doesn't need to be part of the main libvelox.

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, but (correct me if I'm wrong) since the AbstractInputGenerator is part of the CustomTypeFactories, TimestampWithTimeZoneRegistration.cpp needs to link against TimestampWithTimeZoneInputGenerator.h in order to construct the TimestampWithTimeZoneInputGenerator, so if it's not included in the main libvelox we run into linker errors. Similarly velox/common/fuzzer is included in the main libvelox and it contains ConstrainedGenerators.h which is just a bunch of fuzzers (AbstractInputGenerators).

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
…#12481)

Summary:

This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone 
type.  It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
…#12481)

Summary:

This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone 
type.  It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
…#12481)

Summary:

This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone 
type.  It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

…#12481)

Summary:

This diff adds an implementation of AbstractInputGenerator for the TimestampWithTimeZone 
type.  It uses a random int64_t for the number of milliseconds (there may be overflow since we
only have 52 bits for the milliseconds but that doesn't matter since it's random anyway) and
selects a random time zone ID from a list of valid time zone IDs provided by TimeZoneMap.

Differential Revision: D70362561
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70362561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants