File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
subprojects/trino-redisearch/src/main/java/com/redis/trino Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ config {
50
50
}
51
51
}
52
52
}
53
+
54
+ coverage {
55
+ jacoco {
56
+ toolVersion = ' 0.8.8'
57
+ }
58
+ }
53
59
}
54
60
55
61
allprojects {
@@ -69,6 +75,11 @@ subprojects {
69
75
info {
70
76
description = project. project_description
71
77
}
78
+ coverage {
79
+ jacoco {
80
+ toolVersion = ' 0.8.8'
81
+ }
82
+ }
72
83
}
73
84
test {
74
85
maxHeapSize = " 1024m"
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ jacksonVersion=2.13.1
19
19
jnaVersion =5.10.0
20
20
jodaVersion =2.10.13
21
21
junitVersion =5.8.2
22
- lettucemodVersion =3.0.0
22
+ lettucemodVersion =3.0.1
23
23
testcontainersRedisVersion =1.6.0
24
24
servletVersion =4.0.1
25
25
slf4jVersion =1.7.32
Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ private RediSearchTable loadTableSchema(SchemaTableName schemaTableName) {
167
167
}
168
168
Set <String > fields = new HashSet <>();
169
169
ImmutableList .Builder <RediSearchColumnHandle > columnHandles = ImmutableList .builder ();
170
- for (Field <String > columnMetadata : indexInfo .get ().getFields ()) {
171
- RediSearchColumnHandle column = buildColumnHandle (columnMetadata );
170
+ for (Field <String > field : indexInfo .get ().getFields ()) {
171
+ RediSearchColumnHandle column = buildColumnHandle (field );
172
172
fields .add (column .getName ());
173
173
columnHandles .add (column );
174
174
}
@@ -199,7 +199,15 @@ private Optional<IndexInfo> indexInfo(String index) {
199
199
}
200
200
201
201
private RediSearchColumnHandle buildColumnHandle (Field <String > field ) {
202
- return buildColumnHandle (field .getName (), field .getType (), false );
202
+ return buildColumnHandle (name (field ), field .getType (), false );
203
+ }
204
+
205
+ private String name (Field <String > field ) {
206
+ Optional <String > as = field .getAs ();
207
+ if (as .isEmpty ()) {
208
+ return field .getName ();
209
+ }
210
+ return as .get ();
203
211
}
204
212
205
213
private RediSearchColumnHandle buildColumnHandle (String name , Field .Type type , boolean hidden ) {
You can’t perform that action at this time.
0 commit comments