Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion src/main/java/io/airlift/tpch/LineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,16 @@ public long getLineNumber()
return lineNumber;
}

public long getQuantity()
public double getQuantity()
{
return quantity;
}

public long getQuantityUnscaled()
{
return quantity * 100;
}

public double getExtendedPrice()
{
return extendedPrice / 100.0;
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/io/airlift/tpch/LineItemColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ public long getLong(LineItem lineItem)
}
},

QUANTITY("quantity", BIGINT)
QUANTITY("quantity", DOUBLE)
{
public long getLong(LineItem lineItem)
public double getDouble(LineItem lineItem)
{
return lineItem.getQuantity();
}

public long getLong(LineItem lineItem)
{
return lineItem.getQuantityUnscaled();
}
},

@SuppressWarnings("SpellCheckingInspection")
Expand Down