@@ -66,7 +66,8 @@ public void testWhereInSubquery() {
6666 JSONObject result =
6767 executeQuery (
6868 String .format (
69- "source = %s | where id in [source = %s | fields uid ] | sort - salary | fields id, name, salary" ,
69+ "source = %s | where id in [source = %s | fields uid ] | sort - salary | fields"
70+ + " id, name, salary" ,
7071 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
7172 verifySchema (
7273 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -84,7 +85,8 @@ public void testFilterInSubquery() {
8485 JSONObject result =
8586 executeQuery (
8687 String .format (
87- "source = %s id in [source = %s | fields uid]| sort - salary| fields id, name, salary" ,
88+ "source = %s id in [source = %s | fields uid]| sort - salary| fields id, name,"
89+ + " salary" ,
8890 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
8991 verifySchema (
9092 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -102,12 +104,14 @@ public void testInSubqueryWithParentheses() {
102104 JSONObject result1 =
103105 executeQuery (
104106 String .format (
105- "source = %s| where (id) in [source = %s | fields uid]| sort - salary| fields id, name" ,
107+ "source = %s| where (id) in [source = %s | fields uid]| sort - salary| fields id,"
108+ + " name" ,
106109 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
107110 JSONObject result2 =
108111 executeQuery (
109112 String .format (
110- "source = %s (id) in [ source = %s | fields uid] | sort - salary | fields id, name, salary" ,
113+ "source = %s (id) in [ source = %s | fields uid] | sort - salary | fields id,"
114+ + " name, salary" ,
111115 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
112116 verifySchema (
113117 result1 , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -134,7 +138,8 @@ public void testTwoExpressionsInSubquery() {
134138 JSONObject result =
135139 executeQuery (
136140 String .format (
137- " source = %s | where (id, name) in [ source = %s | fields uid, name] | sort - salary | fields id, name, salary " ,
141+ " source = %s | where (id, name) in [ source = %s | fields uid, name] | sort -"
142+ + " salary | fields id, name, salary " ,
138143 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
139144 verifySchema (
140145 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -151,7 +156,8 @@ public void testWhereNotInSubquery() {
151156 JSONObject result =
152157 executeQuery (
153158 String .format (
154- "source = %s | where id not in [ source = %s | fields uid] | sort - salary | fields id, name, salary " ,
159+ "source = %s | where id not in [ source = %s | fields uid] | sort - salary |"
160+ + " fields id, name, salary " ,
155161 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
156162 verifySchema (
157163 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -163,7 +169,8 @@ public void testFilterNotInSubquery() {
163169 JSONObject result =
164170 executeQuery (
165171 String .format (
166- "source = %s id not in [ source = %s | fields uid] | sort - salary | fields id, name, salary " ,
172+ "source = %s id not in [ source = %s | fields uid] | sort - salary | fields id,"
173+ + " name, salary " ,
167174 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
168175 verifySchema (
169176 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -175,7 +182,8 @@ public void testTwoExpressionsNotInSubquery() {
175182 JSONObject result =
176183 executeQuery (
177184 String .format (
178- "source = %s | where (id, name) not in [ source = %s | fields uid, name] | sort - salary | fields id, name, salary " ,
185+ "source = %s | where (id, name) not in [ source = %s | fields uid, name] | sort -"
186+ + " salary | fields id, name, salary " ,
179187 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
180188 verifySchema (
181189 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -188,7 +196,8 @@ public void testEmptyInSubquery() {
188196 JSONObject result =
189197 executeQuery (
190198 String .format (
191- "source = %s id not in [source = %s | where uid = 0000 | fields uid]| sort - salary| fields id, name, salary" ,
199+ "source = %s id not in [source = %s | where uid = 0000 | fields uid]| sort -"
200+ + " salary| fields id, name, salary" ,
192201 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
193202 verifySchema (
194203 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -208,7 +217,9 @@ public void testNestedInSubquery() {
208217 JSONObject result =
209218 executeQuery (
210219 String .format (
211- "source = %s| where id in [source = %s| where occupation in [source = %s| where occupation != 'Engineer'| fields occupation ]| fields uid]| sort - salary| fields id, name, salary" ,
220+ "source = %s| where id in [source = %s| where occupation in [source = %s| where"
221+ + " occupation != 'Engineer'| fields occupation ]| fields uid]| sort - salary|"
222+ + " fields id, name, salary" ,
212223 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION , TEST_INDEX_OCCUPATION ));
213224 verifySchema (
214225 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -224,7 +235,9 @@ public void testInSubqueryAsJoinFilter() {
224235 JSONObject result =
225236 executeQuery (
226237 String .format (
227- "source = %s| inner join left=a, right=b ON a.id = b.uid AND b.occupation in [source = %s | where occupation != 'Engineer' | fields occupation] %s | fields a.id, a.name, a.salary, b.occupation" ,
238+ "source = %s| inner join left=a, right=b ON a.id = b.uid AND b.occupation in"
239+ + " [source = %s | where occupation != 'Engineer' | fields occupation] %s |"
240+ + " fields a.id, a.name, a.salary, b.occupation" ,
228241 TEST_INDEX_WORKER , TEST_INDEX_OCCUPATION , TEST_INDEX_WORK_INFORMATION ));
229242 verifySchema (
230243 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
@@ -243,7 +256,8 @@ public void failWhenNumOfColumnsNotMatchOutputOfSubquery() {
243256 () ->
244257 executeQuery (
245258 String .format (
246- "source = %s| where id in [source = %s | fields uid, department ]| sort - salary | fields id, name, salary" ,
259+ "source = %s| where id in [source = %s | fields uid, department ]| sort -"
260+ + " salary | fields id, name, salary" ,
247261 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION )));
248262 verifyErrorMessageContains (
249263 e1 ,
@@ -256,7 +270,8 @@ public void failWhenNumOfColumnsNotMatchOutputOfSubquery() {
256270 () ->
257271 executeQuery (
258272 String .format (
259- "source = %s| where (id, name, salary) in [source = %s | fields uid, department] | sort - salary| fields id, name, salary" ,
273+ "source = %s| where (id, name, salary) in [source = %s | fields uid,"
274+ + " department] | sort - salary| fields id, name, salary" ,
260275 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION )));
261276 verifyErrorMessageContains (
262277 e2 ,
@@ -269,7 +284,8 @@ public void testInSubqueryWithTableAlias() {
269284 JSONObject result =
270285 executeQuery (
271286 String .format (
272- "source = %s as o | where id in [ source = %s as i | where i.department = 'DATA' | fields uid] | sort - o.salary | fields o.id, o.name, o.salary " ,
287+ "source = %s as o | where id in [ source = %s as i | where i.department = 'DATA' |"
288+ + " fields uid] | sort - o.salary | fields o.id, o.name, o.salary " ,
273289 TEST_INDEX_WORKER , TEST_INDEX_WORK_INFORMATION ));
274290 verifySchema (
275291 result , schema ("id" , "integer" ), schema ("name" , "string" ), schema ("salary" , "integer" ));
0 commit comments