@@ -64,9 +64,12 @@ public void testUnsupportedAndMultiTypedFields() {
64
64
LinkedHashSet <String > ipIndices = new LinkedHashSet <>();
65
65
ipIndices .add ("test1" );
66
66
ipIndices .add ("test2" );
67
+ ipIndices .add ("test3" );
68
+ ipIndices .add ("test4" );
69
+ ipIndices .add ("test5" );
67
70
LinkedHashMap <String , Set <String >> typesToIndices = new LinkedHashMap <>();
68
71
typesToIndices .put ("ip" , ipIndices );
69
- typesToIndices .put ("keyword" , Set .of ("test3 " ));
72
+ typesToIndices .put ("keyword" , Set .of ("test6 " ));
70
73
EsField multiTypedField = new InvalidMappedField (multiTyped , typesToIndices );
71
74
72
75
// Also add an unsupported/multityped field under the names `int` and `double` so we can use `LOOKUP int_number_names ...` and
@@ -85,7 +88,7 @@ public void testUnsupportedAndMultiTypedFields() {
85
88
);
86
89
assertEquals (
87
90
"1:22: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
88
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
91
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
89
92
error ("from test* | dissect multi_typed \" %{foo}\" " , analyzer )
90
93
);
91
94
@@ -95,7 +98,7 @@ public void testUnsupportedAndMultiTypedFields() {
95
98
);
96
99
assertEquals (
97
100
"1:19: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
98
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
101
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
99
102
error ("from test* | grok multi_typed \" %{WORD:foo}\" " , analyzer )
100
103
);
101
104
@@ -115,7 +118,7 @@ public void testUnsupportedAndMultiTypedFields() {
115
118
);
116
119
assertEquals (
117
120
"1:23: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
118
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
121
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
119
122
error ("from test* | eval x = multi_typed" , analyzer )
120
123
);
121
124
@@ -125,7 +128,7 @@ public void testUnsupportedAndMultiTypedFields() {
125
128
);
126
129
assertEquals (
127
130
"1:32: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
128
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
131
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
129
132
error ("from test* | eval x = to_lower(multi_typed)" , analyzer )
130
133
);
131
134
@@ -135,7 +138,7 @@ public void testUnsupportedAndMultiTypedFields() {
135
138
);
136
139
assertEquals (
137
140
"1:32: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
138
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
141
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
139
142
error ("from test* | stats count(1) by multi_typed" , analyzer )
140
143
);
141
144
if (EsqlCapabilities .Cap .INLINESTATS .isEnabled ()) {
@@ -145,7 +148,7 @@ public void testUnsupportedAndMultiTypedFields() {
145
148
);
146
149
assertEquals (
147
150
"1:38: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
148
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
151
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
149
152
error ("from test* | inlinestats count(1) by multi_typed" , analyzer )
150
153
);
151
154
}
@@ -156,7 +159,7 @@ public void testUnsupportedAndMultiTypedFields() {
156
159
);
157
160
assertEquals (
158
161
"1:27: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
159
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
162
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
160
163
error ("from test* | stats values(multi_typed)" , analyzer )
161
164
);
162
165
if (EsqlCapabilities .Cap .INLINESTATS .isEnabled ()) {
@@ -166,7 +169,7 @@ public void testUnsupportedAndMultiTypedFields() {
166
169
);
167
170
assertEquals (
168
171
"1:33: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
169
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
172
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
170
173
error ("from test* | inlinestats values(multi_typed)" , analyzer )
171
174
);
172
175
}
@@ -177,7 +180,7 @@ public void testUnsupportedAndMultiTypedFields() {
177
180
);
178
181
assertEquals (
179
182
"1:27: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
180
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
183
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
181
184
error ("from test* | stats values(multi_typed)" , analyzer )
182
185
);
183
186
@@ -200,7 +203,7 @@ public void testUnsupportedAndMultiTypedFields() {
200
203
);
201
204
assertEquals (
202
205
"1:24: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
203
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
206
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
204
207
error ("from test* | mv_expand multi_typed" , analyzer )
205
208
);
206
209
@@ -210,7 +213,7 @@ public void testUnsupportedAndMultiTypedFields() {
210
213
);
211
214
assertEquals (
212
215
"1:21: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
213
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
216
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
214
217
error ("from test* | rename multi_typed as x" , analyzer )
215
218
);
216
219
@@ -220,7 +223,7 @@ public void testUnsupportedAndMultiTypedFields() {
220
223
);
221
224
assertEquals (
222
225
"1:19: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
223
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
226
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
224
227
error ("from test* | sort multi_typed desc" , analyzer )
225
228
);
226
229
@@ -230,7 +233,7 @@ public void testUnsupportedAndMultiTypedFields() {
230
233
);
231
234
assertEquals (
232
235
"1:20: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
233
- + " [ip] in [test1, test2] , [keyword] in [test3 ]" ,
236
+ + " [ip] in [test1, test2, test3] and [2] other indices , [keyword] in [test6 ]" ,
234
237
error ("from test* | where multi_typed is not null" , analyzer )
235
238
);
236
239
}
0 commit comments