embulk-filter-calcite 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +3 -0
- data/README.md +61 -0
- data/build.gradle +112 -0
- data/config/checkstyle/checkstyle.xml +128 -0
- data/config/checkstyle/default.xml +108 -0
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +6 -0
- data/gradlew +160 -0
- data/gradlew.bat +90 -0
- data/lib/embulk/filter/calcite.rb +3 -0
- data/src/main/java/org/embulk/filter/calcite/CalciteFilterPlugin.java +309 -0
- data/src/main/java/org/embulk/filter/calcite/PageConverter.java +119 -0
- data/src/main/java/org/embulk/filter/calcite/adapter/page/PageEnumerator.java +56 -0
- data/src/main/java/org/embulk/filter/calcite/adapter/page/PageFieldType.java +44 -0
- data/src/main/java/org/embulk/filter/calcite/adapter/page/PageSchema.java +26 -0
- data/src/main/java/org/embulk/filter/calcite/adapter/page/PageSchemaFactory.java +26 -0
- data/src/main/java/org/embulk/filter/calcite/adapter/page/PageTable.java +69 -0
- data/src/main/java/org/embulk/filter/calcite/getter/FilterColumnGetterFactory.java +45 -0
- data/src/main/java/org/embulk/filter/calcite/getter/UTCTimestampColumnGetter.java +41 -0
- data/src/test/java/org/embulk/filter/calcite/TestCalciteFilterPlugin.java +96 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_int_ops_expected.csv +4 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_int_ops_filter.yml +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_int_ops_in.yml +18 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_int_ops_source.csv +5 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_simple_expected.csv +4 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_simple_filter.yml +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_simple_in.yml +18 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_simple_source.csv +5 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_string_ops_expected.csv +4 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_string_ops_filter.yml +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_string_ops_in.yml +18 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_string_ops_source.csv +5 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_expected.csv +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_filter.yml +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_in.yml +18 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_source.csv +5 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_expected.csv +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_filter.yml +2 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_in.yml +18 -0
- data/src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_source.csv +5 -0
- metadata +137 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: LF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: LF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: LF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: LF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: LF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: embulk-filter-calcite
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Muga Nishizawa
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ~>
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '1.0'
|
19
|
+
name: bundler
|
20
|
+
prerelease: false
|
21
|
+
type: :development
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '10.0'
|
33
|
+
name: rake
|
34
|
+
prerelease: false
|
35
|
+
type: :development
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Translate schema and column values by SQL-like query provided by Apache Calcite.
|
42
|
+
email:
|
43
|
+
- muga.nishizawa@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- .travis.yml
|
50
|
+
- CHANGELOG.md
|
51
|
+
- README.md
|
52
|
+
- build.gradle
|
53
|
+
- config/checkstyle/checkstyle.xml
|
54
|
+
- config/checkstyle/default.xml
|
55
|
+
- gradle/wrapper/gradle-wrapper.jar
|
56
|
+
- gradle/wrapper/gradle-wrapper.properties
|
57
|
+
- gradlew
|
58
|
+
- gradlew.bat
|
59
|
+
- lib/embulk/filter/calcite.rb
|
60
|
+
- src/main/java/org/embulk/filter/calcite/CalciteFilterPlugin.java
|
61
|
+
- src/main/java/org/embulk/filter/calcite/PageConverter.java
|
62
|
+
- src/main/java/org/embulk/filter/calcite/adapter/page/PageEnumerator.java
|
63
|
+
- src/main/java/org/embulk/filter/calcite/adapter/page/PageFieldType.java
|
64
|
+
- src/main/java/org/embulk/filter/calcite/adapter/page/PageSchema.java
|
65
|
+
- src/main/java/org/embulk/filter/calcite/adapter/page/PageSchemaFactory.java
|
66
|
+
- src/main/java/org/embulk/filter/calcite/adapter/page/PageTable.java
|
67
|
+
- src/main/java/org/embulk/filter/calcite/getter/FilterColumnGetterFactory.java
|
68
|
+
- src/main/java/org/embulk/filter/calcite/getter/UTCTimestampColumnGetter.java
|
69
|
+
- src/test/java/org/embulk/filter/calcite/TestCalciteFilterPlugin.java
|
70
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_int_ops_expected.csv
|
71
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_int_ops_filter.yml
|
72
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_int_ops_in.yml
|
73
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_int_ops_source.csv
|
74
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_simple_expected.csv
|
75
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_simple_filter.yml
|
76
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_simple_in.yml
|
77
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_simple_source.csv
|
78
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_string_ops_expected.csv
|
79
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_string_ops_filter.yml
|
80
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_string_ops_in.yml
|
81
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_string_ops_source.csv
|
82
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_expected.csv
|
83
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_filter.yml
|
84
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_in.yml
|
85
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_int_cond_source.csv
|
86
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_expected.csv
|
87
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_filter.yml
|
88
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_in.yml
|
89
|
+
- src/test/resources/org/embulk/filter/calcite/test/test_where_string_cond_source.csv
|
90
|
+
- classpath/aggdesigner-algorithm-6.0.jar
|
91
|
+
- classpath/avatica-core-1.9.0.jar
|
92
|
+
- classpath/avatica-metrics-1.9.0.jar
|
93
|
+
- classpath/calcite-core-1.11.0.jar
|
94
|
+
- classpath/calcite-linq4j-1.11.0.jar
|
95
|
+
- classpath/commons-codec-1.9.jar
|
96
|
+
- classpath/commons-compiler-2.7.6.jar
|
97
|
+
- classpath/commons-dbcp-1.4.jar
|
98
|
+
- classpath/commons-lang-2.4.jar
|
99
|
+
- classpath/commons-lang3-3.2.jar
|
100
|
+
- classpath/commons-logging-1.2.jar
|
101
|
+
- classpath/commons-pool-1.5.4.jar
|
102
|
+
- classpath/embulk-filter-calcite-0.1.0.jar
|
103
|
+
- classpath/embulk-input-jdbc-0.8.2.jar
|
104
|
+
- classpath/httpclient-4.5.2.jar
|
105
|
+
- classpath/httpcore-4.4.4.jar
|
106
|
+
- classpath/jackson-annotations-2.6.3.jar
|
107
|
+
- classpath/jackson-core-2.6.3.jar
|
108
|
+
- classpath/jackson-databind-2.6.3.jar
|
109
|
+
- classpath/janino-2.7.6.jar
|
110
|
+
- classpath/jsr305-1.3.9.jar
|
111
|
+
- classpath/protobuf-java-3.1.0.jar
|
112
|
+
- classpath/slf4j-api-1.7.13.jar
|
113
|
+
homepage: https://github.com/muga/embulk-filter-calcite
|
114
|
+
licenses:
|
115
|
+
- Apache 2.0
|
116
|
+
metadata: {}
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options: []
|
119
|
+
require_paths:
|
120
|
+
- lib
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
requirements: []
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 2.1.9
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Apache Calcite filter plugin for Embulk
|
137
|
+
test_files: []
|