Skip to content

Conversation

wenfang6
Copy link
Collaborator

What changes were proposed in this pull request?

This PR imports JDBC module for XSQL, Creating class of JDBCManager and implementing some standard SQL functions. It works with some common jdbc data sources.

How was this patch tested?

No UT.

@wenfang6 wenfang6 changed the title import JDBC module [CORE] Import JDBC module Oct 18, 2019
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.sql.xsql.manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank

def this() = {
this(null)
}

Copy link
Collaborator

@beliefer beliefer Oct 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def this() = this(null)

case HBASE => CatalogTableType.HBASE
case MYSQL | ORACLE => CatalogTableType.JDBC
case MYSQL | JDBC => CatalogTableType.JDBC
case DRUID => CatalogTableType.JDBC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case JDBC => CatalogTableType.JDBC ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't moved mysql to the jdbc module in this PR. So l didn't remove MYSQL for MysqlManager could work normally.

type DataSourceType = Value
val HIVE, ELASTICSEARCH, MONGO, REDIS, MYSQL, KAFKA, HBASE, DRUID, ORACLE, EXTERNAL = Value
val HIVE, ELASTICSEARCH, MONGO, REDIS, JDBC, MYSQL, KAFKA, HBASE, DRUID, EXTERNAL = Value

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could remove MYSQL ?

@beliefer
Copy link
Collaborator

Could you make the description have more detail?

<artifactId>xsql-hive_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
Copy link
Collaborator

@beliefer beliefer Oct 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there need the dependence xsql-hive ?

<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dependencies are used for testing.l forgot to remove them.

}

class MysqlDataSource(
private val name: String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove MysqlDataSource ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants