Skip to content

Commit

Permalink
feat(hive): upgrade to 0.8.0 with QueryBuilderSpec and Tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
raycursive committed Sep 3, 2021
1 parent 71de582 commit 6c961ec
Show file tree
Hide file tree
Showing 4 changed files with 754 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

group = "io.tellery.connectors"
version = "0.6.0-SNAPSHOT"
version = "0.8.0"

repositories {
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/tellery/community-supported-connectors")
credentials {
Expand All @@ -24,7 +23,7 @@ plugins {
}

dependencies {
compileOnly("io.tellery:connector-interface:0.6.0-rc1-SNAPSHOT")
compileOnly("io.tellery:connector-interface:0.8.0-SNAPSHOT")
runtimeOnly("org.apache.hive:hive-jdbc:2.1.0") {
exclude(group = "org.slf4j")
exclude(group = "log4j", module = "log4j")
Expand Down
50 changes: 50 additions & 0 deletions hive/resources/Hive-SparkSQLQueryBuilderSpec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"identifier": "`?`",
"stringLiteral": "'?'",
"aggregation": {
"CHAR,VARCHAR,LONGVARCHAR,DATE,TIME,TIMESTAMP": {
"count": "count(?)",
"countDistinct": "count(distinct ?)"
},
"TINYINT,SMALLINT,INTEGER,BIGINT,FLOAT,REAL,DOUBLE,NUMERIC,DECIMAL": {
"sum": "sum(?)",
"avg": "avg(?)",
"min": "min(?)",
"max": "max(?)",
"median": "percentile(?, 0.5)",
"std": "stddev(?)"
}
},
"bucketization": {
"CHAR,VARCHAR,LONGVARCHAR,TINYINT,SMALLINT,INTEGER,BIGINT": {},
"DATE,TIME,TIMESTAMP": {
"byYear": "year(?)",
"byMonth": "date_format(?, 'yyyy-MM')",
"byWeek": "weekofyear(?)",
"byDate": "to_date(?)"
}
},
"comparator": {
"rlike": "? RLIKE ?",
"like": "? LIKE ?",
"isNull": "? IS NULL",
"isNotNull": "? IS NOT NULL",
"isTrue": "? IS TRUE",
"isFalse": "? IS False",
"greater": "? > ?",
"less": "? < ?",
"greaterOrEqual": "? >= ?",
"lessOrEqual": "? <= ?",
"notEqual": "? != ?",
"between": "? BETWEEN ? AND ?",
"notBetween": "? NOT BETWEEN ? AND ?",
"and": "AND",
"or": "OR"
},
"typeConversion": {
"TINYINT,SMALLINT,INTEGER,BIGINT,FLOAT,REAL,DOUBLE,NUMERIC,DECIMAL": "?",
"CHAR,VARCHAR,LONGVARCHAR": "'?'",
"DATE": "date('?')",
"TIME,TIMESTAMP": "timestamp('?')"
}
}
Loading

0 comments on commit 6c961ec

Please sign in to comment.