@@ -144,97 +144,89 @@ public void testNumericFormats() {
144144 @ Test
145145 @ SneakyThrows
146146 public void testDateNanosWithFormats () {
147- String query = String . format ( "SELECT hour_minute_second_OR_t_time"
148- + " FROM %s" , TEST_INDEX_DATE_FORMATS );
147+ String query =
148+ String . format ( "SELECT hour_minute_second_OR_t_time" + " FROM %s" , TEST_INDEX_DATE_FORMATS );
149149 JSONObject result = executeQuery (query );
150- verifySchema (result ,
151- schema ("hour_minute_second_OR_t_time" , null , "time" ));
152- verifyDataRows (result ,
153- rows ("09:07:42" ),
154- rows ("07:07:42.123456789" ));
150+ verifySchema (result , schema ("hour_minute_second_OR_t_time" , null , "time" ));
151+ verifyDataRows (result , rows ("09:07:42" ), rows ("07:07:42.123456789" ));
155152 }
156153
157154 @ Test
158155 @ SneakyThrows
159156 public void testDateNanosWithFunctions () {
160157 // in memory funcs
161- String query = String .format (
162- "SELECT"
163- + " hour_minute_second_OR_t_time > TIME '08:07:00',"
164- + " hour_minute_second_OR_t_time < TIME '08:07:00',"
165- + " hour_minute_second_OR_t_time = t_time_no_millis,"
166- + " hour_minute_second_OR_t_time <> strict_t_time,"
167- + " hour_minute_second_OR_t_time >= t_time"
168- + " FROM %s" ,
169- TEST_INDEX_DATE_FORMATS );
158+ String query =
159+ String .format (
160+ "SELECT"
161+ + " hour_minute_second_OR_t_time > TIME '08:07:00',"
162+ + " hour_minute_second_OR_t_time < TIME '08:07:00',"
163+ + " hour_minute_second_OR_t_time = t_time_no_millis,"
164+ + " hour_minute_second_OR_t_time <> strict_t_time,"
165+ + " hour_minute_second_OR_t_time >= t_time"
166+ + " FROM %s" ,
167+ TEST_INDEX_DATE_FORMATS );
170168 JSONObject result = executeQuery (query );
171- verifySchema (result ,
169+ verifySchema (
170+ result ,
172171 schema ("hour_minute_second_OR_t_time > TIME '08:07:00'" , null , "boolean" ),
173172 schema ("hour_minute_second_OR_t_time < TIME '08:07:00'" , null , "boolean" ),
174173 schema ("hour_minute_second_OR_t_time = t_time_no_millis" , null , "boolean" ),
175174 schema ("hour_minute_second_OR_t_time <> strict_t_time" , null , "boolean" ),
176175 schema ("hour_minute_second_OR_t_time >= t_time" , null , "boolean" ));
177- verifyDataRows (result ,
178- rows (true , false , true , false , true ),
179- rows (false , true , false , true , false ));
176+ verifyDataRows (
177+ result , rows (true , false , true , false , true ), rows (false , true , false , true , false ));
180178 // push down
181- query = String .format (
182- "SELECT hour_minute_second_OR_t_time"
183- + " FROM %s WHERE hour_minute_second_OR_t_time > TIME '08:07:00'" ,
184- TEST_INDEX_DATE_FORMATS );
179+ query =
180+ String .format (
181+ "SELECT hour_minute_second_OR_t_time"
182+ + " FROM %s WHERE hour_minute_second_OR_t_time > TIME '08:07:00'" ,
183+ TEST_INDEX_DATE_FORMATS );
185184 result = executeQuery (query );
186- verifySchema (result ,
187- schema ("hour_minute_second_OR_t_time" , null , "time" ));
188- verifyDataRows (result ,
189- rows ("09:07:42" ));
190- query = String .format (
191- "SELECT hour_minute_second_OR_t_time"
192- + " FROM %s WHERE hour_minute_second_OR_t_time < TIME '08:07:00'" ,
193- TEST_INDEX_DATE_FORMATS );
185+ verifySchema (result , schema ("hour_minute_second_OR_t_time" , null , "time" ));
186+ verifyDataRows (result , rows ("09:07:42" ));
187+ query =
188+ String .format (
189+ "SELECT hour_minute_second_OR_t_time"
190+ + " FROM %s WHERE hour_minute_second_OR_t_time < TIME '08:07:00'" ,
191+ TEST_INDEX_DATE_FORMATS );
194192 result = executeQuery (query );
195- verifySchema (result ,
196- schema ("hour_minute_second_OR_t_time" , null , "time" ));
197- verifyDataRows (result ,
198- rows ("07:07:42.123456789" ));
193+ verifySchema (result , schema ("hour_minute_second_OR_t_time" , null , "time" ));
194+ verifyDataRows (result , rows ("07:07:42.123456789" ));
199195 }
200196
201197 @ Test
202198 @ SneakyThrows
203199 public void testDateNanosOrderBy () {
204- String query = String .format ("SELECT hour_minute_second_OR_t_time"
205- + " FROM %s ORDER BY hour_minute_second_OR_t_time ASC" , TEST_INDEX_DATE_FORMATS );
200+ String query =
201+ String .format (
202+ "SELECT hour_minute_second_OR_t_time"
203+ + " FROM %s ORDER BY hour_minute_second_OR_t_time ASC" ,
204+ TEST_INDEX_DATE_FORMATS );
206205 JSONObject result = executeQuery (query );
207- verifySchema (result ,
208- schema ("hour_minute_second_OR_t_time" , null , "time" ));
209- verifyDataRows (result ,
210- rows ("07:07:42.123456789" ),
211- rows ("09:07:42" ));
206+ verifySchema (result , schema ("hour_minute_second_OR_t_time" , null , "time" ));
207+ verifyDataRows (result , rows ("07:07:42.123456789" ), rows ("09:07:42" ));
212208 }
213209
214-
215210 @ Test
216211 @ SneakyThrows
217212 public void testDateNanosGroupBy () {
218- String query = String .format ("SELECT count(*)"
219- + " FROM %s GROUP BY hour_minute_second_OR_t_time" , TEST_INDEX_DATE_FORMATS );
213+ String query =
214+ String .format (
215+ "SELECT count(*)" + " FROM %s GROUP BY hour_minute_second_OR_t_time" ,
216+ TEST_INDEX_DATE_FORMATS );
220217 JSONObject result = executeQuery (query );
221- verifySchema (result ,
222- schema ("count(*)" , null , "integer" ));
223- verifyDataRows (result ,
224- rows (1 ),
225- rows (1 ));
218+ verifySchema (result , schema ("count(*)" , null , "integer" ));
219+ verifyDataRows (result , rows (1 ), rows (1 ));
226220 }
227221
228222 @ Test
229223 @ SneakyThrows
230224 public void testDateNanosWithNanos () {
231- String query = String . format ( "SELECT date_nanos_value"
232- + " FROM %s" , TEST_INDEX_DATATYPE_NONNUMERIC );
225+ String query =
226+ String . format ( "SELECT date_nanos_value" + " FROM %s" , TEST_INDEX_DATATYPE_NONNUMERIC );
233227 JSONObject result = executeQuery (query );
234- verifySchema (result ,
235- schema ("date_nanos_value" , null , "timestamp" ));
236- verifyDataRows (result ,
237- rows ("2019-03-24 01:34:46.123456789" ));
228+ verifySchema (result , schema ("date_nanos_value" , null , "timestamp" ));
229+ verifyDataRows (result , rows ("2019-03-24 01:34:46.123456789" ));
238230 }
239231
240232 protected JSONObject executeQuery (String query ) throws IOException {
0 commit comments