Class AnswerAssertions

java.lang.Object
org.gridgain.tpcds.answer.AnswerAssertions

public class AnswerAssertions extends Object
Assertions for comparing TPC-DS query results with expected answers.
  • Constructor Details

    • AnswerAssertions

      public AnswerAssertions()
  • Method Details

    • assertQueryResults

      public static void assertQueryResults(List<List<String>> expected, List<List<Object>> actual)
      Asserts that the actual query results match the expected answers.
      Parameters:
      expected - The expected results.
      actual - The actual results from executing the query.
    • assertRow

      public static void assertRow(int rowIdx, List<String> expectedRow, List<Object> actualRow)
      Assert that given row matches expected row.
      Parameters:
      rowIdx - index of the row in the overall resultset, used to provide useful error message.
      expectedRow - sample row that we expect.
      actualRow - actual row that we should match against expected row.
    • assertValue

      public static void assertValue(String expectedAnsValue, Object actualValue)
      Asserts that an actual value matches the expected ANS value.
      Parameters:
      expectedAnsValue - The expected value in ANS format.
      actualValue - The actual value to check.
    • assertValue

      public static void assertValue(String reason, String expectedAnsValue, Object actualValue)
      Asserts that an actual value matches the expected ANS value with a custom failure reason.
      Parameters:
      reason - The custom failure message to display if the assertion fails.
      expectedAnsValue - The expected value in ANS format.
      actualValue - The actual value to check.
    • isAnsValue

      public static org.hamcrest.Matcher<Object> isAnsValue(String expectedAnsValue)