Skip to content

Commit

Permalink
apply reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Oct 10, 2024
1 parent ed3046d commit 7dfa168
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 63 deletions.
58 changes: 29 additions & 29 deletions src/main/java/com/oltpbenchmark/benchmarks/seats/SEATSLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public CustomerIterable(Table catalog_tbl, long total) {
protected Object specialValue(long id, int columnIdx) {
Object value = null;
switch (columnIdx) {
// CUSTOMER ID
// CUSTOMER ID
case (0):
{
// HACK: The flights_per_airport histogram may not match up
Expand All @@ -950,26 +950,26 @@ protected Object specialValue(long id, int columnIdx) {
}
break;
}
// CUSTOMER ID STR
// CUSTOMER ID STR
case (1):
{
value = this.last_id.encode();
this.last_id = null;
break;
}
// LOCAL AIRPORT
// LOCAL AIRPORT
case (2):
{
value = this.airport_code;
break;
}
// BALANCE
// BALANCE
case (3):
{
value = (double) this.randBalance.nextInt();
break;
}
// BAD MOJO!
// BAD MOJO!
default:
}
return (value);
Expand Down Expand Up @@ -1060,7 +1060,7 @@ public FrequentFlyerIterable(Table catalog_tbl, long num_customers) {
protected Object specialValue(long id, int columnIdx) {
String value = null;
switch (columnIdx) {
// CUSTOMER ID
// CUSTOMER ID
case (0):
{
while (this.customer_idx < this.ff_per_customer.length
Expand All @@ -1080,7 +1080,7 @@ protected Object specialValue(long id, int columnIdx) {
value = this.last_customer_id.encode();
break;
}
// AIRLINE ID
// AIRLINE ID
case (1):
{
do {
Expand All @@ -1092,13 +1092,13 @@ protected Object specialValue(long id, int columnIdx) {
}
break;
}
// CUSTOMER_ID_STR
// CUSTOMER_ID_STR
case (2):
{
value = this.last_customer_id.encode();
break;
}
// BAD MOJO!
// BAD MOJO!
default:
}
return (value);
Expand Down Expand Up @@ -1195,19 +1195,19 @@ protected boolean hasNext() {
protected Object specialValue(long id, int columnIdx) {
Object value = null;
switch (columnIdx) {
// OUTER AIRPORT
// OUTER AIRPORT
case (0):
value = this.outer_airport;
break;
// INNER AIRPORT
// INNER AIRPORT
case (1):
value = this.inner_airport;
break;
// DISTANCE
// DISTANCE
case (2):
value = this.distance;
break;
// BAD MOJO!
// BAD MOJO!
default:
}
return (value);
Expand Down Expand Up @@ -1389,7 +1389,7 @@ boolean seatIsOccupied() {
protected Object specialValue(long id, int columnIdx) {
Object value = null;
switch (columnIdx) {
// FLIGHT ID
// FLIGHT ID
case (0):
{
// Figure out what date we are currently on
Expand Down Expand Up @@ -1435,56 +1435,56 @@ protected Object specialValue(long id, int columnIdx) {
value = this.flight_id.encode();
break;
}
// AIRLINE ID
// AIRLINE ID
case (1):
{
value = this.airline_code;
SEATSLoader.this.flights_per_airline.put(this.airline_code);
break;
}
// DEPART AIRPORT
// DEPART AIRPORT
case (2):
{
value = this.depart_airport;
break;
}
// DEPART TIME
// DEPART TIME
case (3):
{
value = this.depart_time;
break;
}
// ARRIVE AIRPORT
// ARRIVE AIRPORT
case (4):
{
value = this.arrive_airport;
break;
}
// ARRIVE TIME
// ARRIVE TIME
case (5):
{
value = this.arrive_time;
break;
}
// FLIGHT STATUS
// FLIGHT STATUS
case (6):
{
value = this.status;
break;
}
// BASE PRICE
// BASE PRICE
case (7):
{
value = (double) this.prices.nextInt();
break;
}
// SEATS TOTAL
// SEATS TOTAL
case (8):
{
value = SEATSConstants.FLIGHTS_NUM_SEATS;
break;
}
// SEATS REMAINING
// SEATS REMAINING
case (9):
{
// We have to figure this out ahead of time since we need to
Expand All @@ -1501,7 +1501,7 @@ protected Object specialValue(long id, int columnIdx) {
}
break;
}
// BAD MOJO!
// BAD MOJO!
default:
}
return (value);
Expand Down Expand Up @@ -1763,13 +1763,13 @@ protected Object specialValue(long id, int columnIdx) {

Object value = null;
switch (columnIdx) {
// CUSTOMER ID
// CUSTOMER ID
case (1):
{
value = ((CustomerId) this.current[0]).encode();
break;
}
// FLIGHT ID
// FLIGHT ID
case (2):
{
FlightId flight_id = (FlightId) this.current[1];
Expand All @@ -1782,19 +1782,19 @@ protected Object specialValue(long id, int columnIdx) {
}
break;
}
// SEAT
// SEAT
case (3):
{
value = this.current[2];
break;
}
// PRICE
// PRICE
case (4):
{
value = (double) this.prices.nextInt();
break;
}
// BAD MOJO!
// BAD MOJO!
default:
}
return (value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private CustomClassLoader loadQueryTemplates(String file) {
ParsedQueryTemplate qt = b.build();
// Create and compile class.
final String s =
"""
"""
package %s ;
import %s ;
public final class %s extends %s {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivGetOrderIdSQL =
new SQLStmt(
"""
"""
SELECT NO_O_ID FROM %s
WHERE NO_D_ID = ?
AND NO_W_ID = ?
Expand All @@ -45,7 +45,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivDeleteNewOrderSQL =
new SQLStmt(
"""
"""
DELETE FROM %s
WHERE NO_O_ID = ?
AND NO_D_ID = ?
Expand All @@ -55,7 +55,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivGetCustIdSQL =
new SQLStmt(
"""
"""
SELECT O_C_ID FROM %s
WHERE O_ID = ?
AND O_D_ID = ?
Expand All @@ -65,7 +65,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivUpdateCarrierIdSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET O_CARRIER_ID = ?
WHERE O_ID = ?
Expand All @@ -76,7 +76,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivUpdateDeliveryDateSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET OL_DELIVERY_D = ?
WHERE OL_O_ID = ?
Expand All @@ -87,7 +87,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivSumOrderAmountSQL =
new SQLStmt(
"""
"""
SELECT SUM(OL_AMOUNT) AS OL_TOTAL
FROM %s
WHERE OL_O_ID = ?
Expand All @@ -98,7 +98,7 @@ SELECT SUM(OL_AMOUNT) AS OL_TOTAL

public SQLStmt delivUpdateCustBalDelivCntSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET C_BALANCE = C_BALANCE + ?,
C_DELIVERY_CNT = C_DELIVERY_CNT + 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetCustSQL =
new SQLStmt(
"""
"""
SELECT C_DISCOUNT, C_LAST, C_CREDIT
FROM %s
WHERE C_W_ID = ?
Expand All @@ -45,7 +45,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetWhseSQL =
new SQLStmt(
"""
"""
SELECT W_TAX
FROM %s
WHERE W_ID = ?
Expand All @@ -54,7 +54,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetDistSQL =
new SQLStmt(
"""
"""
SELECT D_NEXT_O_ID, D_TAX
FROM %s
WHERE D_W_ID = ? AND D_ID = ? FOR UPDATE
Expand All @@ -63,7 +63,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertNewOrderSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(NO_O_ID, NO_D_ID, NO_W_ID)
VALUES ( ?, ?, ?)
Expand All @@ -72,7 +72,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtUpdateDistSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET D_NEXT_O_ID = D_NEXT_O_ID + 1
WHERE D_W_ID = ?
Expand All @@ -82,7 +82,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertOOrderSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(O_ID, O_D_ID, O_W_ID, O_C_ID, O_ENTRY_D, O_OL_CNT, O_ALL_LOCAL)
VALUES (?, ?, ?, ?, ?, ?, ?)
Expand All @@ -91,7 +91,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetItemSQL =
new SQLStmt(
"""
"""
SELECT I_PRICE, I_NAME , I_DATA
FROM %s
WHERE I_ID = ?
Expand All @@ -100,7 +100,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetStockSQL =
new SQLStmt(
"""
"""
SELECT S_QUANTITY, S_DATA, S_DIST_01, S_DIST_02, S_DIST_03, S_DIST_04, S_DIST_05,
S_DIST_06, S_DIST_07, S_DIST_08, S_DIST_09, S_DIST_10
FROM %s
Expand All @@ -111,7 +111,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtUpdateStockSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET S_QUANTITY = ? ,
S_YTD = S_YTD + ?,
Expand All @@ -124,7 +124,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertOrderLineSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(OL_O_ID, OL_D_ID, OL_W_ID, OL_NUMBER, OL_I_ID, OL_SUPPLY_W_ID, OL_QUANTITY, OL_AMOUNT, OL_DIST_INFO)
VALUES (?,?,?,?,?,?,?,?,?)
Expand Down
Loading

0 comments on commit 7dfa168

Please sign in to comment.