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 {
5050 }
5151 }
5252 }
53+
54+ coverage {
55+ jacoco {
56+ toolVersion = ' 0.8.8'
57+ }
58+ }
5359}
5460
5561allprojects {
@@ -69,6 +75,11 @@ subprojects {
6975 info {
7076 description = project. project_description
7177 }
78+ coverage {
79+ jacoco {
80+ toolVersion = ' 0.8.8'
81+ }
82+ }
7283 }
7384 test {
7485 maxHeapSize = " 1024m"
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ jacksonVersion=2.13.1
1919jnaVersion =5.10.0
2020jodaVersion =2.10.13
2121junitVersion =5.8.2
22- lettucemodVersion =3.0.0
22+ lettucemodVersion =3.0.1
2323testcontainersRedisVersion =1.6.0
2424servletVersion =4.0.1
2525slf4jVersion =1.7.32
Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ private RediSearchTable loadTableSchema(SchemaTableName schemaTableName) {
167167 }
168168 Set <String > fields = new HashSet <>();
169169 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 );
172172 fields .add (column .getName ());
173173 columnHandles .add (column );
174174 }
@@ -199,7 +199,15 @@ private Optional<IndexInfo> indexInfo(String index) {
199199 }
200200
201201 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 ();
203211 }
204212
205213 private RediSearchColumnHandle buildColumnHandle (String name , Field .Type type , boolean hidden ) {
You can’t perform that action at this time.
0 commit comments