Example #1
0
 def do_test_query(self, query):
     jvm_session = _get_jvm_session(spark)
     jvm = _get_jvm(spark)
     tests = {
         "q1": jvm.com.nvidia.spark.rapids.tests.tpch.Q1Like,
         "q2": jvm.com.nvidia.spark.rapids.tests.tpch.Q2Like,
         "q3": jvm.com.nvidia.spark.rapids.tests.tpch.Q3Like,
         "q4": jvm.com.nvidia.spark.rapids.tests.tpch.Q4Like,
         "q5": jvm.com.nvidia.spark.rapids.tests.tpch.Q5Like,
         "q6": jvm.com.nvidia.spark.rapids.tests.tpch.Q6Like,
         "q7": jvm.com.nvidia.spark.rapids.tests.tpch.Q7Like,
         "q8": jvm.com.nvidia.spark.rapids.tests.tpch.Q8Like,
         "q9": jvm.com.nvidia.spark.rapids.tests.tpch.Q9Like,
         "q10": jvm.com.nvidia.spark.rapids.tests.tpch.Q10Like,
         "q11": jvm.com.nvidia.spark.rapids.tests.tpch.Q11Like,
         "q12": jvm.com.nvidia.spark.rapids.tests.tpch.Q12Like,
         "q13": jvm.com.nvidia.spark.rapids.tests.tpch.Q13Like,
         "q14": jvm.com.nvidia.spark.rapids.tests.tpch.Q14Like,
         "q15": jvm.com.nvidia.spark.rapids.tests.tpch.Q15Like,
         "q16": jvm.com.nvidia.spark.rapids.tests.tpch.Q16Like,
         "q17": jvm.com.nvidia.spark.rapids.tests.tpch.Q17Like,
         "q18": jvm.com.nvidia.spark.rapids.tests.tpch.Q18Like,
         "q19": jvm.com.nvidia.spark.rapids.tests.tpch.Q19Like,
         "q20": jvm.com.nvidia.spark.rapids.tests.tpch.Q20Like,
         "q21": jvm.com.nvidia.spark.rapids.tests.tpch.Q21Like,
         "q22": jvm.com.nvidia.spark.rapids.tests.tpch.Q22Like
     }
     df = tests.get(query).apply(jvm_session)
     return DataFrame(df, spark.getActiveSession())
Example #2
0
 def do_test_query(self, query):
     jvm_session = _get_jvm_session(spark)
     jvm = _get_jvm(spark)
     tests = {
         "q5": jvm.com.nvidia.spark.rapids.tests.tpcxbb.Q5Like,
         "q16": jvm.com.nvidia.spark.rapids.tests.tpcxbb.Q16Like,
         "q21": jvm.com.nvidia.spark.rapids.tests.tpcxbb.Q21Like,
         "q22": jvm.com.nvidia.spark.rapids.tests.tpcxbb.Q22Like
     }
     df = tests.get(query).apply(jvm_session)
     return DataFrame(df, spark.getActiveSession())
Example #3
0
    def do_test_query(self, spark):
        jvm_session = _get_jvm_session(spark)
        jvm = _get_jvm(spark)
        acq = self.mortgage_acq_path
        perf = self.mortgage_perf_path
        run = jvm.com.nvidia.spark.rapids.tests.mortgage.Run
        if self.mortgage_format == 'csv':
            df = run.csv(jvm_session, perf, acq)
        elif self.mortgage_format == 'parquet':
            df = run.parquet(jvm_session, perf, acq)
        elif self.mortgage_format == 'orc':
            df = run.orc(jvm_session, perf, acq)
        else:
            raise AssertionError('Not Supported Format {}'.format(
                self.mortgage_format))

        return DataFrame(df, spark.getActiveSession())