embulk-filter-calcite 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/CHANGELOG.md +16 -0
- data/README.md +6 -0
- data/build.gradle +15 -7
- data/src/main/java/org/embulk/filter/calcite/CalciteFilterPlugin.java +0 -6
- data/src/test/resources/org/embulk/filter/calcite/test/test_int_ops_filter.yml +3 -1
- data/src/test/resources/org/embulk/filter/calcite/test/test_string_ops_filter.yml +3 -1
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_filter.yml +3 -1
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_filter.yml +2 -0
- metadata +7 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48c576d18942a7c87f2878cdc708e337220d6a53
|
4
|
+
data.tar.gz: 1a69c0b4859f9415da408c34045a70ca17834e42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbfa07f41c931b5ad05d06261dea43148eb9d166e6f5089bdc049a619819527c446609685e723025d61923eeb189efb536838a7bfa40062ee248561caa8e8d73
|
7
|
+
data.tar.gz: ee316df1659928cbb2d0937690dbaea73cd49a63f6c4238827e55a70c36552207041280eaad975313daddf687f5f7bfd4d151724c2a79851bfbb6e82e6de6116
|
data/.travis.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
language: java
|
2
2
|
jdk: oraclejdk8 # Use oraclejdk8 because checkstyle jar is compiled by jdk8 but, released plugin is still built by oraclejdk7.
|
3
3
|
script:
|
4
|
-
- ./gradlew --info check
|
4
|
+
- ./gradlew --info check
|
5
|
+
after_success:
|
6
|
+
- ./gradlew jacocoTestReport coveralls
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.2.0 - 2017-07-14
|
2
|
+
|
3
|
+
* [maintenance] Add 'options' config option in README.md. [#29]
|
4
|
+
|
5
|
+
* [maintenance] Not set case sensitive implicitly. [#30]
|
6
|
+
|
7
|
+
* [maintenance] Upgrade Embulk 0.8.26. [#31]
|
8
|
+
|
9
|
+
* [maintenance] Upgrade apache calciste 1.13.0. [#32]
|
10
|
+
|
11
|
+
* [maintenance] Show build status from Travis CI on README.md. [#33]
|
12
|
+
|
13
|
+
* [maintenance] Show test coverage from Coveralls on README.md. [#34]
|
14
|
+
|
15
|
+
* [maintenance] Show Code Climate's score. [#35]
|
16
|
+
|
1
17
|
## 0.1.3 - 2017-05-18
|
2
18
|
|
3
19
|
* [maintenance] Use PreparedStatement to improve the performance. [#23]
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Apache Calcite filter plugin for Embulk
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/muga/embulk-filter-calcite.svg?branch=master)](https://travis-ci.org/muga/embulk-filter-calcite)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/github/muga/embulk-filter-calcite/badge.svg?branch=master)](https://coveralls.io/github/muga/embulk-filter-calcite?branch=master)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/muga/embulk-filter-calcite/badges/gpa.svg)](https://codeclimate.com/github/muga/embulk-filter-calcite)
|
6
|
+
|
3
7
|
## Overview
|
4
8
|
|
5
9
|
* **Plugin type**: filter
|
@@ -35,6 +39,8 @@ Data types by Apache Calcite: https://calcite.apache.org/docs/reference.html#dat
|
|
35
39
|
|
36
40
|
- **query**: SQL to run (string, required)
|
37
41
|
- **default_timezone**: Configure timezone that is used for JDBC connection properties and Calcite engine. This option is one of [JDBC connect parameters](https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters) provided by Apache Calcite. java.util.TimeZone's [AvailableIDs](http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html#getAvailableIDs) can be specified. (string, default: 'UTC')
|
42
|
+
- **options**: extra JDBC properties. See [JDBC connect parameters](https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters). (hash, default: {})
|
43
|
+
|
38
44
|
|
39
45
|
## Example
|
40
46
|
|
data/build.gradle
CHANGED
@@ -5,6 +5,7 @@ plugins {
|
|
5
5
|
id "checkstyle"
|
6
6
|
id "findbugs"
|
7
7
|
id "jacoco"
|
8
|
+
id "com.github.kt3k.coveralls" version "2.4.0"
|
8
9
|
}
|
9
10
|
import com.github.jrubygradle.JRubyExec
|
10
11
|
|
@@ -17,21 +18,21 @@ configurations {
|
|
17
18
|
provided
|
18
19
|
}
|
19
20
|
|
20
|
-
version = "0.
|
21
|
+
version = "0.2.0"
|
21
22
|
|
22
23
|
sourceCompatibility = 1.7
|
23
24
|
targetCompatibility = 1.7
|
24
25
|
|
25
26
|
dependencies {
|
26
|
-
compile "org.embulk:embulk-core:0.8.
|
27
|
-
provided "org.embulk:embulk-core:0.8.
|
27
|
+
compile "org.embulk:embulk-core:0.8.26"
|
28
|
+
provided "org.embulk:embulk-core:0.8.26"
|
28
29
|
compile "org.embulk.input.jdbc:embulk-input-jdbc:0.8.2"
|
29
|
-
compile "org.apache.calcite:calcite-core:1.
|
30
|
+
compile "org.apache.calcite:calcite-core:1.13.0"
|
30
31
|
|
31
32
|
testCompile "junit:junit:4.+"
|
32
|
-
testCompile "org.embulk:embulk-core:0.8.
|
33
|
-
testCompile "org.embulk:embulk-standards:0.8.
|
34
|
-
testCompile "org.embulk:embulk-test:0.8.
|
33
|
+
testCompile "org.embulk:embulk-core:0.8.26:tests"
|
34
|
+
testCompile "org.embulk:embulk-standards:0.8.26"
|
35
|
+
testCompile "org.embulk:embulk-test:0.8.26"
|
35
36
|
}
|
36
37
|
|
37
38
|
task classpath(type: Copy, dependsOn: ["jar"]) {
|
@@ -64,6 +65,13 @@ findbugs {
|
|
64
65
|
ignoreFailures = true
|
65
66
|
}
|
66
67
|
|
68
|
+
jacocoTestReport {
|
69
|
+
reports {
|
70
|
+
xml.enabled = true // coveralls plugin depends on xml format report
|
71
|
+
html.enabled = true
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
67
75
|
task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) {
|
68
76
|
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "build"
|
69
77
|
script "${project.name}.gemspec"
|
@@ -84,18 +84,12 @@ public class CalciteFilterPlugin implements FilterPlugin {
|
|
84
84
|
|
85
85
|
private void setupPropertiesFromTransaction(PluginTask task, Properties props) {
|
86
86
|
final ToStringMap options = task.getOptions();
|
87
|
-
if (!options.containsKey("caseSensitive")) {
|
88
|
-
log.warn("JDBC parameter 'caseSensitive' is implicitly set to false as default in");
|
89
|
-
log.warn("embulk-filter-calcite 0.1 but, it's scheduled to change default with true");
|
90
|
-
log.warn("in 0.2. Please use 'options' option to set 'caseSensitive' to false.");
|
91
|
-
}
|
92
87
|
setupProperties(task, props);
|
93
88
|
}
|
94
89
|
|
95
90
|
private void setupProperties(PluginTask task, Properties props) {
|
96
91
|
// @see https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters
|
97
92
|
final ToStringMap options = task.getOptions();
|
98
|
-
props.setProperty("caseSensitive", "false"); // Relax case-sensitive
|
99
93
|
props.setProperty("timeZone", task.getDefaultTimeZone().getID());
|
100
94
|
|
101
95
|
// overwrites props with 'options' option
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-filter-calcite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muga Nishizawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,25 +95,21 @@ files:
|
|
95
95
|
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_in.yml
|
96
96
|
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_source.csv
|
97
97
|
- classpath/aggdesigner-algorithm-6.0.jar
|
98
|
-
- classpath/avatica-core-1.
|
99
|
-
- classpath/avatica-metrics-1.
|
100
|
-
- classpath/calcite-core-1.
|
101
|
-
- classpath/calcite-linq4j-1.
|
98
|
+
- classpath/avatica-core-1.10.0.jar
|
99
|
+
- classpath/avatica-metrics-1.10.0.jar
|
100
|
+
- classpath/calcite-core-1.13.0.jar
|
101
|
+
- classpath/calcite-linq4j-1.13.0.jar
|
102
102
|
- classpath/commons-codec-1.9.jar
|
103
103
|
- classpath/commons-compiler-2.7.6.jar
|
104
104
|
- classpath/commons-dbcp-1.4.jar
|
105
105
|
- classpath/commons-lang-2.4.jar
|
106
|
-
- classpath/commons-lang3-3.2.jar
|
107
106
|
- classpath/commons-logging-1.2.jar
|
108
107
|
- classpath/commons-pool-1.5.4.jar
|
109
|
-
- classpath/embulk-filter-calcite-0.
|
108
|
+
- classpath/embulk-filter-calcite-0.2.0.jar
|
110
109
|
- classpath/embulk-input-jdbc-0.8.2.jar
|
111
110
|
- classpath/guava-19.0.jar
|
112
111
|
- classpath/httpclient-4.5.2.jar
|
113
112
|
- classpath/httpcore-4.4.4.jar
|
114
|
-
- classpath/jackson-annotations-2.6.3.jar
|
115
|
-
- classpath/jackson-core-2.6.3.jar
|
116
|
-
- classpath/jackson-databind-2.6.3.jar
|
117
113
|
- classpath/janino-2.7.6.jar
|
118
114
|
- classpath/jsr305-3.0.1.jar
|
119
115
|
- classpath/protobuf-java-3.1.0.jar
|