Skip to content

Commit

Permalink
Fix problem about package without -skipTest occurred error
Browse files Browse the repository at this point in the history
  • Loading branch information
liusiyuan1 committed Sep 9, 2020
1 parent c775462 commit e9697f5
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 147 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.qihoo.qsql.plan;

import com.qihoo.qsql.api.SqlRunner;
import com.qihoo.qsql.exception.ParseException;
import com.qihoo.qsql.metadata.MetadataPostman;
import com.qihoo.qsql.plan.proc.DataSetTransformProcedure;
Expand Down Expand Up @@ -111,7 +112,8 @@ public void testMixSqlWithSubQuery() {
String sql = "SELECT dep_id, (SELECT COUNT(stu_id) FROM action_required.homework_content)"
+ " FROM edu_manage.department WHERE dep_id = 1";
QueryProcedure queryProcedure =
new QueryProcedureProducer(getSchemaPath(Arrays.asList(MYSQL_TABLE_NAME, HIVE_TABLE_NAME)))
new QueryProcedureProducer(getSchemaPath(Arrays.asList(MYSQL_TABLE_NAME, HIVE_TABLE_NAME)),
SqlRunner.builder().setTransformRunner(SqlRunner.Builder.RunnerType.SPARK))
.createQueryProcedure(sql);
List<Class> extractorList = getExtractorList(queryProcedure);
if (extractorList.contains(HiveExtractor.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.apache.calcite.avatica.util.Casing;
import org.apache.calcite.avatica.util.Quoting;
import com.qihoo.qsql.org.apache.calcite.model.ModelHandler;
Expand Down
11 changes: 10 additions & 1 deletion meta/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>qsql</artifactId>
<groupId>com.qihoo.qsql</groupId>
Expand Down Expand Up @@ -181,6 +181,15 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
public class MetadataUtil {

private static final String META_STORE_PATH = "../metastore/schema.db";
private static final String META_STORE_MODE = "intern";
/**
* .
*/
Expand Down Expand Up @@ -56,11 +58,15 @@ public static Properties readProperties(String fileName) {
Properties properties = new Properties();
String home = System.getenv("QSQL_HOME");
File metaProperties;

if (! StringUtils.isEmpty(home)) {
metaProperties = new File(home + "/conf/" + fileName);
} else {
metaProperties = new File(MetadataUtil.class.getResource("/" + fileName).getFile());
properties.put(MetadataParams.META_STORAGE_MODE, META_STORE_MODE);
properties.put(MetadataParams.META_INTERN_SCHEMA_DIR, META_STORE_PATH);
return properties;
}

try (InputStream input = new FileInputStream(metaProperties)) {
properties.load(input);
} catch (IOException ioe) {
Expand Down

This file was deleted.

0 comments on commit e9697f5

Please sign in to comment.