-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Return statistics for faker tables #24863
Merged
losipiuk
merged 6 commits into
trinodb:master
from
losipiuk:lukaszos/add-faker-fte-query-runner-643b2f
Feb 3, 2025
Merged
Return statistics for faker tables #24863
losipiuk
merged 6 commits into
trinodb:master
from
losipiuk:lukaszos/add-faker-fte-query-runner-643b2f
Feb 3, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nineinchnick
approved these changes
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/PropertyValues.java
Outdated
Show resolved
Hide resolved
plugin/trino-faker/src/main/java/io/trino/plugin/faker/PropertyValues.java
Outdated
Show resolved
Hide resolved
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-faker/src/test/java/io/trino/plugin/faker/FakerQueryRunner.java
Outdated
Show resolved
Hide resolved
613a50f
to
e39c222
Compare
Yeah - it should work fine if I take value from table handle, not from
property.
…On Fri, Jan 31, 2025 at 5:29 PM Jan Waś ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java
<#24863 (comment)>:
> + if (!info.properties().containsKey(TableInfo.DEFAULT_LIMIT_PROPERTY)) {
+ return TableStatistics.empty();
See
https://github.com/trinodb/trino/blob/master/plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java#L193
—
Reply to this email directly, view it on GitHub
<#24863 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGZJ77ZV3WPTXUXFUG3GWT2NOQFLAVCNFSM6AAAAABWHZVKPGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOBXGIZTQOBRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Lukasz
|
e39c222
to
898dc2d
Compare
nineinchnick
approved these changes
Jan 31, 2025
throw new TrinoException(INVALID_COLUMN_PROPERTY, "The `%s` property for a %s column must be a valid %s literal".formatted(STEP_PROPERTY, column.getType().getDisplayName(), type.getDisplayName()), e); | ||
Type stepType = type; | ||
if (DATE.equals(type) || type instanceof TimestampType || type instanceof TimestampWithTimeZoneType || type instanceof TimeType || type instanceof TimeWithTimeZoneType) { | ||
stepType = BIGINT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only support long steps, maybe no need to check the types here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was failing without that
wendigo
reviewed
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerColumnHandle.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerColumnHandle.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jan 31, 2025
plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerMetadata.java
Show resolved
Hide resolved
wendigo
approved these changes
Jan 31, 2025
898dc2d
to
bea29e9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Additional context and related issues
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: