Skip to content

SDK-91: Java sdk: JsonParseException: Numeric value (2393972736.0) ou… #62

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/main/java/com/qubole/qds/sdk/java/entities/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class Query
{
private int id;
private int cpu;
private long id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change the id to be an int?
We are < 20 million right now, It would be a really long time before we hit 2 billion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no specific reason, thought it is better to move the ints to long to avoid such issues in future.
dont think this will effect the functionality.

private long cpu;
private String created_at;
private long fs_bytes_written;
private long fs_bytes_read;
Expand All @@ -34,7 +34,7 @@ public Query()
{
}

public Query(int id, int cpu, String created_at, long fs_bytes_written, long fs_bytes_read, String command_type, String submitted_by, String status, String command_summary)
public Query(long id, long cpu, String created_at, long fs_bytes_written, long fs_bytes_read, String command_type, String submitted_by, String status, String command_summary)
{
this.id = id;
this.cpu = cpu;
Expand All @@ -47,22 +47,22 @@ public Query(int id, int cpu, String created_at, long fs_bytes_written, long fs_
this.command_summary = command_summary;
}

public int getId()
public long getId()
{
return id;
}

public void setId(int id)
public void setId(long id)
{
this.id = id;
}

public int getCpu()
public long getCpu()
{
return cpu;
}

public void setCpu(int cpu)
public void setCpu(long cpu)
{
this.cpu = cpu;
}
Expand Down