This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin-on-parquet-v2 in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/kylin-on-parquet-v2 by this push: new ccdff32 KYLIN-4660 Add comparison with prepared data set ccdff32 is described below commit ccdff322431e90eef8807f3fd3eb9870b726d73c Author: XiaoxiangYu <hit_la...@126.com> AuthorDate: Mon Aug 24 22:54:15 2020 +0800 KYLIN-4660 Add comparison with prepared data set --- .../test/java/org/apache/kylin/engine/spark2/NExecAndComp.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NExecAndComp.java b/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NExecAndComp.java index 977c916..986b1ea 100644 --- a/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NExecAndComp.java +++ b/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NExecAndComp.java @@ -121,7 +121,14 @@ public class NExecAndComp { addQueryPath(recAndQueryResult, query, sql); if (compareLevel == CompareLevel.SAME) { - Dataset<Row> sparkResult = queryWithSpark(prj, sql, query.getFirst()); + Dataset<Row> sparkResult = null; + String csvDataPathStr = query.getFirst() + ".expected"; + if(new File(csvDataPathStr).exists()) { + logger.debug("Use expected dataset for {}", sql); + sparkResult = KylinSparkEnv.getSparkSession().read().csv(csvDataPathStr); + } else { + sparkResult = queryWithSpark(prj, sql, query.getFirst()); + } String result = SparkQueryTest.checkAnswer(SparkQueryTest.castDataType(cubeResult, sparkResult), sparkResult, false); if (result != null) { logger.error("Failed on compare query ({}) :{}", joinType, query);