This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new c6200f9 KYLIN-4787 Auto add USE $DATABASE; to the beginning of
create_sample_tables.sql
c6200f9 is described below
commit c6200f9d27e03ab340f3b678d5faf7f719b86264
Author: yaqian.zhang <[email protected]>
AuthorDate: Wed Oct 14 17:57:17 2020 +0800
KYLIN-4787 Auto add USE $DATABASE; to the beginning of
create_sample_tables.sql
---
build/bin/sample.sh | 3 +++
build/smoke-test/testBuildCube.py | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index a6bea85..e323f1c 100755
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -65,6 +65,9 @@ then
beeline ${hive_conf_properties} --hivevar hdfs_tmp_dir=${hdfs_tmp_dir}
${beeline_params} -f ${KYLIN_HOME}/sample_cube/create_sample_tables.sql || {
exit 1; }
else
hive ${hive_conf_properties} -e "CREATE DATABASE IF NOT EXISTS
"$sample_database
+ ## Add USE DATABASE; to the beginning of create_sample_tables.sql
+ sed -i "/^USE*/d" ${KYLIN_HOME}/sample_cube/create_sample_tables.sql
+ sed -i "/DROP TABLE IF EXISTS KYLIN_CAL_DT;/i USE $sample_database;"
${KYLIN_HOME}/sample_cube/create_sample_tables.sql
hive ${hive_conf_properties} --hivevar hdfs_tmp_dir=${hdfs_tmp_dir}
--database $sample_database -f
${KYLIN_HOME}/sample_cube/create_sample_tables.sql || { exit 1; }
fi
diff --git a/build/smoke-test/testBuildCube.py
b/build/smoke-test/testBuildCube.py
index 18e6d46..bd86673 100644
--- a/build/smoke-test/testBuildCube.py
+++ b/build/smoke-test/testBuildCube.py
@@ -47,7 +47,7 @@ class testBuildCube(unittest.TestCase):
'cubeName': cube_name}
response = requests.request("PUT", self._clone_cube_url, json=payload,
headers=self._headers)
self.assertEqual(response.status_code, 200, 'Clone cube : ' +
cube_name + ' failed.')
- update_engine_url = self._base_url + "/cubes/engine/" + cube_name +
"/" + engine_type
+ update_engine_url = self._base_url + "/cubes/" + cube_name +
"/engine/" + engine_type
response = requests.request("PUT", update_engine_url,
headers=self._headers)
self.assertEqual(response.status_code, 200, 'Update engine type of
cube : ' + cube_name + ' failed.')