embulk-filter-row 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +6 -0
- data/README.md +124 -4
- data/build.gradle +15 -4
- data/classpath/embulk-filter-row-0.3.0.jar +0 -0
- data/example/and.yml +0 -7
- data/example/example.yml +0 -7
- data/example/where.yml +28 -0
- data/script/byaccj.sh +29 -0
- data/src/main/java/org/embulk/filter/row/{AbstractColumnVisitor.java → AbstractGuardColumnVisitor.java} +9 -17
- data/src/main/java/org/embulk/filter/row/BuildColumnVisitorImpl.java +98 -0
- data/src/main/java/org/embulk/filter/row/{ColumnVisitorAndImpl.java → GuardColumnVisitorAndImpl.java} +11 -45
- data/src/main/java/org/embulk/filter/row/{ColumnVisitorOrImpl.java → GuardColumnVisitorOrImpl.java} +11 -45
- data/src/main/java/org/embulk/filter/row/GuardColumnVisitorWhereImpl.java +28 -0
- data/src/main/java/org/embulk/filter/row/RowFilterPlugin.java +49 -16
- data/src/main/java/org/embulk/filter/row/where/Parser.java +831 -0
- data/src/main/java/org/embulk/filter/row/where/ParserExp.java +290 -0
- data/src/main/java/org/embulk/filter/row/where/ParserLiteral.java +277 -0
- data/src/main/java/org/embulk/filter/row/where/ParserNode.java +6 -0
- data/src/main/java/org/embulk/filter/row/where/ParserVal.java +78 -0
- data/src/main/java/org/embulk/filter/row/where/Yylex.java +833 -0
- data/src/main/java/org/embulk/filter/row/where/_lexer.l +108 -0
- data/src/main/java/org/embulk/filter/row/where/_parser.y +137 -0
- data/src/test/java/org/embulk/filter/row/where/TestParser.java +383 -0
- data/src/test/java/org/embulk/filter/row/where/TestYylex.java +256 -0
- metadata +19 -5
- data/classpath/embulk-filter-row-0.2.2.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50dcbbafd3bb2429121a86d74143612f79ca4570
|
4
|
+
data.tar.gz: ee2a1c37ef931525a43764976d258004b1d24f8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 016cc549f49bdc513c9a92e7550779484c1d0a3a8d465f00de6be3db9ee94b39ed280dd9423ae592562f0366b671aeb54eacd612a8a8f3a7fe4494d99ee6959a
|
7
|
+
data.tar.gz: cc67e9ae035b6ccb4d9c5892b9f638ed51910061c38061040a3c526f0f316c1ae5f61d57aea79aa4ba94ef588382d1b1011efbbb36a0eef779cd6606779f8107
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -33,6 +33,7 @@ A filter plugin for Embulk to filter out rows
|
|
33
33
|
* **not**: not (boolean, optional, default: false)
|
34
34
|
* **format**: special option for timestamp column, specify the format of timestamp argument, parsed argument is compared with the column value as Timestamp object (string, default is `%Y-%m-%d %H:%M:%S.%N %z`)
|
35
35
|
* **timezone**: special option for timestamp column, specify the timezone of timestamp argument (string, default is `UTC`)
|
36
|
+
* **where** (experimental): Write conditions with SQL-like syntax. See [SQL-like Syntax](#sql-like-syntax)
|
36
37
|
|
37
38
|
NOTE: column type is automatically retrieved from input data (inputSchema)
|
38
39
|
|
@@ -63,7 +64,7 @@ filters:
|
|
63
64
|
|
64
65
|
## Example (AND of OR)
|
65
66
|
|
66
|
-
|
67
|
+
You can express a condition such as `(A OR B) AND (C OR D)` by combining multiple filters like
|
67
68
|
|
68
69
|
```yaml
|
69
70
|
filters:
|
@@ -81,10 +82,129 @@ filters:
|
|
81
82
|
|
82
83
|
This is equivalent with `((A OR B) AND (C OR D))`.
|
83
84
|
|
84
|
-
##
|
85
|
+
## Example (WHERE) (Experimental)
|
85
86
|
|
86
|
-
|
87
|
-
|
87
|
+
Versions >= 0.3.0 suppors SQL-like syntax like
|
88
|
+
|
89
|
+
```yaml
|
90
|
+
filters:
|
91
|
+
- type: row
|
92
|
+
where: |-
|
93
|
+
(
|
94
|
+
string START_WITH 'str' AND
|
95
|
+
number > 1.0
|
96
|
+
)
|
97
|
+
OR
|
98
|
+
(
|
99
|
+
time = TIMESTAMP '2016-01-01 +0900' AND
|
100
|
+
"true" = true
|
101
|
+
)
|
102
|
+
```
|
103
|
+
|
104
|
+
See [SQL-like Syntax](#sql-like-syntax) for more details
|
105
|
+
|
106
|
+
# SQL-like Syntax
|
107
|
+
|
108
|
+
Versions >= 0.3.0 suppors SQL-like syntax as:
|
109
|
+
|
110
|
+
```
|
111
|
+
where: |-
|
112
|
+
(
|
113
|
+
string START_WITH 'str' AND
|
114
|
+
number > 1.0
|
115
|
+
)
|
116
|
+
OR
|
117
|
+
(
|
118
|
+
time = TIMESTAMP '2016-01-01 +0900' AND
|
119
|
+
"true" = true
|
120
|
+
)
|
121
|
+
```
|
122
|
+
|
123
|
+
## Literals
|
124
|
+
|
125
|
+
### Boolean Literal
|
126
|
+
|
127
|
+
`true` or `TRUE` or `false` or `FALSE` are considered as a boolean literal
|
128
|
+
|
129
|
+
### Number Literal
|
130
|
+
|
131
|
+
Characters matching with a regular expression `-?[0-9]+(\.[0-9]+)?` is considered as a number literal
|
132
|
+
|
133
|
+
### String Literal
|
134
|
+
|
135
|
+
Characters surrounded by `'` such as `'foo'` is considered as a string literal
|
136
|
+
|
137
|
+
### Timestamp Literal
|
138
|
+
|
139
|
+
`TIMESTAMP ( NumberLiteral | StringLiteral )` such as `TIMESTAMP 1470433087.747123` or `TIMESTAMP '2016-08-06 06:38:07.747123 +0900'` is considered as a timestamp literal
|
140
|
+
|
141
|
+
Number is a epoch time since 1970-01-01 UTC with nano time resolution.
|
142
|
+
|
143
|
+
String is a timestamp string which matches with one of following format:
|
144
|
+
|
145
|
+
* `%Y-%m-%d %H:%M:%S.%N %z`
|
146
|
+
* `%Y-%m-%d %H:%M:%S.%N`
|
147
|
+
* `%Y-%m-%d %H:%M:%S %z`
|
148
|
+
* `%Y-%m-%d %H:%M:%S`
|
149
|
+
* `%Y-%m-%d %z`
|
150
|
+
* `%Y-%m-%d`
|
151
|
+
|
152
|
+
The default time zone is UTC, and the time resolution is micro second (caused by limitation of Embulk TimestampParser).
|
153
|
+
|
154
|
+
### Json Literal
|
155
|
+
|
156
|
+
Not supported yet
|
157
|
+
|
158
|
+
### Identifier Literal
|
159
|
+
|
160
|
+
Characters matching with a regular expression `[a-zA-Z$][a-zA-z0-9\.\-_]*` such as `foobar`, and characters surrounded by `"` such as `"foo\"bar"` are considred as an identifier literal, that is, embulk's column name.
|
161
|
+
|
162
|
+
## Operators
|
163
|
+
|
164
|
+
### Boolean Operator
|
165
|
+
|
166
|
+
* ==
|
167
|
+
* !=
|
168
|
+
|
169
|
+
### Number Operator (Long and Double)
|
170
|
+
|
171
|
+
* ==
|
172
|
+
* !=
|
173
|
+
* >
|
174
|
+
* >=
|
175
|
+
* <=
|
176
|
+
* <
|
177
|
+
|
178
|
+
### String Operator
|
179
|
+
|
180
|
+
* ==
|
181
|
+
* !=
|
182
|
+
* START_WITH
|
183
|
+
* END_WITH
|
184
|
+
* INCLUDE
|
185
|
+
|
186
|
+
### Timestamp Operator
|
187
|
+
|
188
|
+
* ==
|
189
|
+
* !=
|
190
|
+
* >
|
191
|
+
* >=
|
192
|
+
* <=
|
193
|
+
* <
|
194
|
+
|
195
|
+
### Json Operator
|
196
|
+
|
197
|
+
Not supported yet
|
198
|
+
|
199
|
+
### unary operator
|
200
|
+
|
201
|
+
* "xxx IS NULL"
|
202
|
+
* "xxx IS NOT NULL"
|
203
|
+
* "NOT xxx"
|
204
|
+
|
205
|
+
## ToDo
|
206
|
+
|
207
|
+
* Support filtering by values of `type: json` with JSONPath
|
88
208
|
|
89
209
|
## ChangeLog
|
90
210
|
|
data/build.gradle
CHANGED
@@ -3,6 +3,8 @@ plugins {
|
|
3
3
|
id "com.github.jruby-gradle.base" version "0.1.5"
|
4
4
|
id "java"
|
5
5
|
id "checkstyle"
|
6
|
+
id "jacoco"
|
7
|
+
id "findbugs"
|
6
8
|
}
|
7
9
|
import com.github.jrubygradle.JRubyExec
|
8
10
|
repositories {
|
@@ -13,21 +15,30 @@ configurations {
|
|
13
15
|
provided
|
14
16
|
}
|
15
17
|
|
16
|
-
version = "0.
|
18
|
+
version = "0.3.0"
|
17
19
|
sourceCompatibility = 1.7
|
18
20
|
targetCompatibility = 1.7
|
19
21
|
|
20
22
|
dependencies {
|
21
|
-
compile "org.embulk:embulk-core:0.8
|
22
|
-
provided "org.embulk:embulk-core:0.8
|
23
|
-
|
23
|
+
compile "org.embulk:embulk-core:0.8.+"
|
24
|
+
provided "org.embulk:embulk-core:0.8.+"
|
25
|
+
|
24
26
|
testCompile "junit:junit:4.+"
|
27
|
+
testCompile "org.embulk:embulk-core:0.8.+:tests"
|
28
|
+
testCompile "org.embulk:embulk-standards:0.8.+"
|
25
29
|
}
|
26
30
|
|
27
31
|
checkstyle {
|
28
32
|
toolVersion = '6.7'
|
29
33
|
}
|
30
34
|
|
35
|
+
task byaccj() {
|
36
|
+
[file("script/byaccj.sh")].execute()
|
37
|
+
}
|
38
|
+
|
39
|
+
// append dependsOn to compileJava task
|
40
|
+
compileJava.dependsOn(byaccj)
|
41
|
+
|
31
42
|
task classpath(type: Copy, dependsOn: ["jar"]) {
|
32
43
|
doFirst { file("classpath").deleteDir() }
|
33
44
|
from (configurations.runtime - configurations.provided + files(jar.archivePath))
|
Binary file
|
data/example/and.yml
CHANGED
data/example/example.yml
CHANGED
data/example/where.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
in:
|
2
|
+
type: file
|
3
|
+
path_prefix: example/example.csv
|
4
|
+
parser:
|
5
|
+
type: csv
|
6
|
+
charset: UTF-8
|
7
|
+
newline: CRLF
|
8
|
+
null_string: "NULL"
|
9
|
+
skip_header_lines: 1
|
10
|
+
comment_line_marker: '#'
|
11
|
+
columns:
|
12
|
+
- {name: time, type: timestamp, format: "%Y-%m-%d"}
|
13
|
+
- {name: foo, type: string}
|
14
|
+
- {name: bar, type: string}
|
15
|
+
- {name: flag, type: boolean}
|
16
|
+
- {name: id, type: long}
|
17
|
+
- {name: name, type: string}
|
18
|
+
- {name: json, type: json}
|
19
|
+
- {name: score, type: double}
|
20
|
+
filters:
|
21
|
+
- type: row
|
22
|
+
where: |-
|
23
|
+
(time = TIMESTAMP '2015-07-13' AND
|
24
|
+
foo IS NULL AND
|
25
|
+
bar = 'bar' AND score>2000 AND
|
26
|
+
flag=false) OR (id=9)
|
27
|
+
out:
|
28
|
+
type: stdout
|
data/script/byaccj.sh
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/bash -e
|
2
|
+
BYACCJ_VERSION="1.15"
|
3
|
+
JFLEX_VERSION="1.6.1"
|
4
|
+
|
5
|
+
ROOT_PATH=$(cd $(dirname $0); cd ..; pwd)
|
6
|
+
SRC_DIR="src/main/java/org/embulk/filter/row/where"
|
7
|
+
|
8
|
+
if [ $(uname) = "Darwin" ]; then
|
9
|
+
platform="macosx"
|
10
|
+
else
|
11
|
+
platform="linux"
|
12
|
+
fi
|
13
|
+
|
14
|
+
if [ ! -f "$ROOT_PATH/script/yacc" ]; then
|
15
|
+
curl -s -L "http://downloads.sourceforge.net/project/byaccj/byaccj/${BYACCJ_VERSION}/byaccj${BYACCJ_VERSION}_${platform}.tar.gz" | tar xz -C $ROOT_PATH/script/
|
16
|
+
mv $ROOT_PATH/script/yacc.${platform} $ROOT_PATH/script/yacc
|
17
|
+
chmod a+x $ROOT_PATH/script/yacc
|
18
|
+
fi
|
19
|
+
|
20
|
+
if [ ! -L "$ROOT_PATH/script/jflex" ]; then
|
21
|
+
curl -s -L "http://jflex.de/release/jflex-${JFLEX_VERSION}.tar.gz" | tar xz -C $ROOT_PATH/script/
|
22
|
+
fi
|
23
|
+
|
24
|
+
# yacc
|
25
|
+
$ROOT_PATH/script/yacc -J -Jclass=Parser -Jpackage=org.embulk.filter.row.where -Jnoconstruct "$SRC_DIR/_parser.y"
|
26
|
+
mv Parser.java ParserVal.java $SRC_DIR/
|
27
|
+
|
28
|
+
# flex
|
29
|
+
$ROOT_PATH/script/jflex/bin/jflex -d $SRC_DIR "$SRC_DIR/_lexer.l"
|
@@ -6,8 +6,6 @@ import org.embulk.filter.row.condition.Condition;
|
|
6
6
|
import org.embulk.filter.row.condition.ConditionConfig;
|
7
7
|
import org.embulk.filter.row.condition.ConditionFactory;
|
8
8
|
import org.embulk.spi.Column;
|
9
|
-
import org.embulk.spi.ColumnVisitor;
|
10
|
-
import org.embulk.spi.PageBuilder;
|
11
9
|
import org.embulk.spi.PageReader;
|
12
10
|
import org.embulk.spi.Schema;
|
13
11
|
|
@@ -15,25 +13,19 @@ import java.util.ArrayList;
|
|
15
13
|
import java.util.HashMap;
|
16
14
|
import java.util.List;
|
17
15
|
|
18
|
-
abstract class
|
19
|
-
implements ColumnVisitor
|
16
|
+
abstract class AbstractGuardColumnVisitor
|
20
17
|
{
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
AbstractColumnVisitor(PluginTask task, Schema inputSchema, Schema outputSchema, PageReader pageReader, PageBuilder pageBuilder)
|
18
|
+
PluginTask task;
|
19
|
+
Schema inputSchema;
|
20
|
+
Schema outputSchema;
|
21
|
+
PageReader pageReader;
|
22
|
+
|
23
|
+
AbstractGuardColumnVisitor(PluginTask task, Schema inputSchema, Schema outputSchema, PageReader pageReader)
|
29
24
|
{
|
30
25
|
this.task = task;
|
31
26
|
this.inputSchema = inputSchema;
|
32
27
|
this.outputSchema = outputSchema;
|
33
28
|
this.pageReader = pageReader;
|
34
|
-
this.pageBuilder = pageBuilder;
|
35
|
-
|
36
|
-
this.conditionMap = buildConditionMap(task, outputSchema);
|
37
29
|
}
|
38
30
|
|
39
31
|
static HashMap<String, List<Condition>> buildConditionMap(PluginTask task, Schema outputSchema)
|
@@ -44,7 +36,7 @@ abstract class AbstractColumnVisitor
|
|
44
36
|
conditionMap.put(columnName, new ArrayList<Condition>());
|
45
37
|
}
|
46
38
|
|
47
|
-
for (ConditionConfig conditionConfig : task.getConditions()) {
|
39
|
+
for (ConditionConfig conditionConfig : task.getConditions().get()) {
|
48
40
|
String columnName = conditionConfig.getColumn();
|
49
41
|
for (Column column : outputSchema.getColumns()) {
|
50
42
|
if (columnName.equals(column.getName())) {
|
@@ -58,5 +50,5 @@ abstract class AbstractColumnVisitor
|
|
58
50
|
return conditionMap;
|
59
51
|
}
|
60
52
|
|
61
|
-
abstract public boolean visitColumns(Schema
|
53
|
+
abstract public boolean visitColumns(Schema inputSchema);
|
62
54
|
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
package org.embulk.filter.row;
|
2
|
+
|
3
|
+
import org.embulk.filter.row.RowFilterPlugin.PluginTask;
|
4
|
+
|
5
|
+
import org.embulk.spi.Column;
|
6
|
+
import org.embulk.spi.ColumnVisitor;
|
7
|
+
import org.embulk.spi.Exec;
|
8
|
+
import org.embulk.spi.PageBuilder;
|
9
|
+
import org.embulk.spi.PageReader;
|
10
|
+
import org.embulk.spi.Schema;
|
11
|
+
|
12
|
+
import org.slf4j.Logger;
|
13
|
+
|
14
|
+
public class BuildColumnVisitorImpl
|
15
|
+
implements ColumnVisitor
|
16
|
+
{
|
17
|
+
private static final Logger logger = Exec.getLogger(RowFilterPlugin.class);
|
18
|
+
private final PluginTask task;
|
19
|
+
private final Schema inputSchema;
|
20
|
+
private final Schema outputSchema;
|
21
|
+
private final PageReader pageReader;
|
22
|
+
private final PageBuilder pageBuilder;
|
23
|
+
|
24
|
+
BuildColumnVisitorImpl(PluginTask task, Schema inputSchema, Schema outputSchema, PageReader pageReader, PageBuilder pageBuilder)
|
25
|
+
{
|
26
|
+
this.task = task;
|
27
|
+
this.inputSchema = inputSchema;
|
28
|
+
this.outputSchema = outputSchema;
|
29
|
+
this.pageReader = pageReader;
|
30
|
+
this.pageBuilder = pageBuilder;
|
31
|
+
}
|
32
|
+
|
33
|
+
@Override
|
34
|
+
public void booleanColumn(Column column)
|
35
|
+
{
|
36
|
+
if (pageReader.isNull(column)) {
|
37
|
+
pageBuilder.setNull(column);
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
pageBuilder.setBoolean(column, pageReader.getBoolean(column));
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
@Override
|
45
|
+
public void longColumn(Column column)
|
46
|
+
{
|
47
|
+
if (pageReader.isNull(column)) {
|
48
|
+
pageBuilder.setNull(column);
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
pageBuilder.setLong(column, pageReader.getLong(column));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
@Override
|
56
|
+
public void doubleColumn(Column column)
|
57
|
+
{
|
58
|
+
if (pageReader.isNull(column)) {
|
59
|
+
pageBuilder.setNull(column);
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
pageBuilder.setDouble(column, pageReader.getDouble(column));
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
@Override
|
67
|
+
public void stringColumn(Column column)
|
68
|
+
{
|
69
|
+
if (pageReader.isNull(column)) {
|
70
|
+
pageBuilder.setNull(column);
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
pageBuilder.setString(column, pageReader.getString(column));
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
@Override
|
78
|
+
public void timestampColumn(Column column)
|
79
|
+
{
|
80
|
+
if (pageReader.isNull(column)) {
|
81
|
+
pageBuilder.setNull(column);
|
82
|
+
}
|
83
|
+
else {
|
84
|
+
pageBuilder.setTimestamp(column, pageReader.getTimestamp(column));
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
@Override
|
89
|
+
public void jsonColumn(Column column)
|
90
|
+
{
|
91
|
+
if (pageReader.isNull(column)) {
|
92
|
+
pageBuilder.setNull(column);
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
pageBuilder.setJson(column, pageReader.getJson(column));
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
@@ -9,32 +9,37 @@ import org.embulk.filter.row.condition.StringCondition;
|
|
9
9
|
import org.embulk.filter.row.condition.TimestampCondition;
|
10
10
|
|
11
11
|
import org.embulk.spi.Column;
|
12
|
+
import org.embulk.spi.ColumnVisitor;
|
12
13
|
import org.embulk.spi.Exec;
|
13
|
-
import org.embulk.spi.PageBuilder;
|
14
14
|
import org.embulk.spi.PageReader;
|
15
15
|
import org.embulk.spi.Schema;
|
16
16
|
import org.embulk.spi.time.Timestamp;
|
17
17
|
|
18
18
|
import org.slf4j.Logger;
|
19
19
|
|
20
|
+
import java.util.HashMap;
|
20
21
|
import java.util.List;
|
21
22
|
|
22
|
-
class
|
23
|
+
class GuardColumnVisitorAndImpl
|
24
|
+
extends AbstractGuardColumnVisitor
|
25
|
+
implements ColumnVisitor
|
23
26
|
{
|
24
27
|
private static final Logger logger = Exec.getLogger(RowFilterPlugin.class);
|
25
28
|
private boolean shouldAddRecord;
|
29
|
+
private HashMap<String, List<Condition>> conditionMap;
|
26
30
|
|
27
|
-
|
31
|
+
GuardColumnVisitorAndImpl(PluginTask task, Schema inputSchema, Schema outputSchema, PageReader pageReader)
|
28
32
|
{
|
29
|
-
super(task, inputSchema, outputSchema, pageReader
|
33
|
+
super(task, inputSchema, outputSchema, pageReader);
|
34
|
+
this.conditionMap = buildConditionMap(task, outputSchema);
|
30
35
|
}
|
31
36
|
|
32
|
-
public boolean visitColumns(Schema
|
37
|
+
public boolean visitColumns(Schema inputSchema)
|
33
38
|
{
|
34
39
|
//Visitor objects are created for each thread :)
|
35
40
|
//System.out.println(String.format("thread_id:%d object_id:%d", Thread.currentThread().getId(), this.hashCode()));
|
36
41
|
shouldAddRecord = true;
|
37
|
-
for (Column column :
|
42
|
+
for (Column column : inputSchema.getColumns()) {
|
38
43
|
column.visit(this);
|
39
44
|
}
|
40
45
|
return shouldAddRecord;
|
@@ -63,12 +68,6 @@ class ColumnVisitorAndImpl extends AbstractColumnVisitor
|
|
63
68
|
}
|
64
69
|
}
|
65
70
|
}
|
66
|
-
if (pageReader.isNull(column)) {
|
67
|
-
pageBuilder.setNull(column);
|
68
|
-
}
|
69
|
-
else {
|
70
|
-
pageBuilder.setBoolean(column, pageReader.getBoolean(column));
|
71
|
-
}
|
72
71
|
}
|
73
72
|
|
74
73
|
@Override
|
@@ -94,12 +93,6 @@ class ColumnVisitorAndImpl extends AbstractColumnVisitor
|
|
94
93
|
}
|
95
94
|
}
|
96
95
|
}
|
97
|
-
if (pageReader.isNull(column)) {
|
98
|
-
pageBuilder.setNull(column);
|
99
|
-
}
|
100
|
-
else {
|
101
|
-
pageBuilder.setLong(column, pageReader.getLong(column));
|
102
|
-
}
|
103
96
|
}
|
104
97
|
|
105
98
|
@Override
|
@@ -125,12 +118,6 @@ class ColumnVisitorAndImpl extends AbstractColumnVisitor
|
|
125
118
|
}
|
126
119
|
}
|
127
120
|
}
|
128
|
-
if (pageReader.isNull(column)) {
|
129
|
-
pageBuilder.setNull(column);
|
130
|
-
}
|
131
|
-
else {
|
132
|
-
pageBuilder.setDouble(column, pageReader.getDouble(column));
|
133
|
-
}
|
134
121
|
}
|
135
122
|
|
136
123
|
@Override
|
@@ -156,12 +143,6 @@ class ColumnVisitorAndImpl extends AbstractColumnVisitor
|
|
156
143
|
}
|
157
144
|
}
|
158
145
|
}
|
159
|
-
if (pageReader.isNull(column)) {
|
160
|
-
pageBuilder.setNull(column);
|
161
|
-
}
|
162
|
-
else {
|
163
|
-
pageBuilder.setString(column, pageReader.getString(column));
|
164
|
-
}
|
165
146
|
}
|
166
147
|
|
167
148
|
@Override
|
@@ -187,25 +168,10 @@ class ColumnVisitorAndImpl extends AbstractColumnVisitor
|
|
187
168
|
}
|
188
169
|
}
|
189
170
|
}
|
190
|
-
if (pageReader.isNull(column)) {
|
191
|
-
pageBuilder.setNull(column);
|
192
|
-
}
|
193
|
-
else {
|
194
|
-
pageBuilder.setTimestamp(column, pageReader.getTimestamp(column));
|
195
|
-
}
|
196
171
|
}
|
197
172
|
|
198
173
|
@Override
|
199
174
|
public void jsonColumn(Column column)
|
200
175
|
{
|
201
|
-
if (!shouldAddRecord) {
|
202
|
-
return;
|
203
|
-
}
|
204
|
-
if (pageReader.isNull(column)) {
|
205
|
-
pageBuilder.setNull(column);
|
206
|
-
}
|
207
|
-
else {
|
208
|
-
pageBuilder.setJson(column, pageReader.getJson(column));
|
209
|
-
}
|
210
176
|
}
|
211
177
|
}
|