diff --git a/pom.xml b/pom.xml
index 75cf72ff..0e0195f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,13 +10,13 @@
1.0.0-SNAPSHOTstart-db-common
- start-db-teststart-db-avatica-corestart-db-calcitestart-db-jdbc-driverstart-db-cmdstart-db-corestart-db-server
+ start-db-test
@@ -54,6 +54,7 @@
1.4.00.102.0.6
+ 4.0.0
diff --git a/start-db-core/pom.xml b/start-db-core/pom.xml
index 19392023..8f65540f 100644
--- a/start-db-core/pom.xml
+++ b/start-db-core/pom.xml
@@ -17,6 +17,17 @@
+
+ com.google.protobuf
+ protobuf-java
+ 3.1.0
+
+
+ com.google.guava
+ guava
+ 19.0
+
+
org.urbcompstart-db-calcite
@@ -51,7 +62,7 @@
org.apache.hbase
- hbase-client
+ hbase-shaded-client${hbase.version}
@@ -101,6 +112,39 @@
geomesa-utils_${scala.binary.version}${geomesa.version}
+
+
+
+
+
+
+ org.apache.spark
+ spark-sql_${scala.binary.version}
+ 2.4.7
+
+
+ org.locationtech.geomesa
+ geomesa-spark-sql_${scala.binary.version}
+ ${geomesa.version}
+
+
+ org.locationtech.geomesa
+ geomesa-hbase-spark-runtime-hbase2_${scala.binary.version}
+ ${geomesa.version}
+
+
+ org.apache.hadoop
+ hadoop-hdfs
+
+
+
+
+
+
+ com.esotericsoftware
+ kryo
+ ${kryo.version}
+ org.mybatis
diff --git a/start-db-core/src/main/java/org/urbcomp/start/db/parser/Constant.java b/start-db-core/src/main/java/org/urbcomp/start/db/parser/Constant.java
new file mode 100644
index 00000000..1f8bf4ad
--- /dev/null
+++ b/start-db-core/src/main/java/org/urbcomp/start/db/parser/Constant.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2022 ST-Lab
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+package org.urbcomp.start.db.parser;
+
+/**
+ * @author stan
+ * @date 2022/10/5 10:29
+ */
+public class Constant {
+
+ // specify name
+ public static final String HBASE_CATALOG = "hbase.catalog";
+ public static final String HBASE_ZK = "hbase.zookeepers";
+ public static final String SPARK_SERIALIZER = "spark.serializer";
+ public static final String SPARK_KRYO = "spark.kryo.registrator";
+
+ // custom name
+ public static final String CATALOG = "root.default";
+ public static final String ZK = "localhost:2181";
+ public static final String SERIALIZER = "org.apache.spark.serializer.KryoSerializer";
+
+}
diff --git a/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlTableDriver.java b/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlTableDriver.java
new file mode 100644
index 00000000..a40d19be
--- /dev/null
+++ b/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlTableDriver.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2022 ST-Lab
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+package org.urbcomp.start.db.parser;
+
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.urbcomp.start.db.parser.parser.StartDBSqlLexer;
+import org.urbcomp.start.db.parser.parser.StartDBSqlParser;
+
+import java.util.List;
+
+public class SqlTableDriver {
+
+ public List apply(String sql) {
+ CharStream input = CharStreams.fromString(sql);
+ StartDBSqlLexer lexer = new StartDBSqlLexer(input);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+ StartDBSqlParser parser = new StartDBSqlParser(tokenStream);
+ SqlVisitor visitor = new SqlVisitor();
+ visitor.visit(parser.program());
+
+ return visitor.getTableList();
+ }
+}
diff --git a/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlVisitor.java b/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlVisitor.java
new file mode 100644
index 00000000..ac16aa0d
--- /dev/null
+++ b/start-db-core/src/main/java/org/urbcomp/start/db/parser/SqlVisitor.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2022 ST-Lab
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+package org.urbcomp.start.db.parser;
+
+import org.urbcomp.start.db.parser.parser.StartDBSqlBaseVisitor;
+import org.urbcomp.start.db.parser.parser.StartDBSqlParser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author stan
+ * @date 2022/10/5 10:15
+ */
+public class SqlVisitor