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

Fix NaN values handling in the progressPercentage property #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stelmukhov
Copy link
Member

A simple fix for trino-csharp-client#12 since the progressPercentage property is unused.

Another option is to change the progressPercentage type from long to double,
as it uses OptionalDouble in Trino (QueryProgressStats.java#L34).

Thanks

@@ -47,7 +47,6 @@ public bool scheduled
public long processedBytes { get; set; }
public long peakMemoryBytes { get; set; }
public long spilledBytes { get; set; }
public long progressPercentage { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

Separate commit .. and also why are you removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since it's unused and there are other properties that are also missing here, I decided that the simplest fix is to remove it. However, I can also change its type to double, as defined here: QueryProgressStats.java#L34

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I'm ok either way, do we know why it's unused in Java? Is this a Presto legacy? I'd keep it as it's optional until it's removed from the Java

Copy link
Member

Choose a reason for hiding this comment

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

Wdyt @wendigo @electrum .. should we remove here and also in the JDBC driver?

@stelmukhov stelmukhov requested a review from mosabua February 25, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants