77#include < regex>
88using namespace std ::string_literals;
99
10-
1110#define BOOST_BIND_ACTION_PARAM ( push_name ,param ) boost::bind( &push_name::operator (), g_ ## push_name , _1 ,_2, param)
1211namespace s3selectEngine
1312{
@@ -349,7 +348,7 @@ struct _fn_avg : public base_function
349348 return true ;
350349 }
351350
352- void get_aggregate_result (variable *result) override
351+ void get_aggregate_result (variable *result) override
353352 {
354353 if (count == 0 ) {
355354 throw base_s3select_exception (" count cannot be zero!" );
@@ -381,7 +380,7 @@ struct _fn_min : public base_function
381380 return true ;
382381 }
383382
384- void get_aggregate_result (variable* result) override
383+ void get_aggregate_result (variable* result) override
385384 {
386385 *result = min;
387386 }
@@ -411,7 +410,7 @@ struct _fn_max : public base_function
411410 return true ;
412411 }
413412
414- void get_aggregate_result (variable* result) override
413+ void get_aggregate_result (variable* result) override
415414 {
416415 *result = max;
417416 }
@@ -437,13 +436,13 @@ struct _fn_to_int : public base_function
437436 if ((errno == ERANGE && (i == LONG_MAX || i == LONG_MIN)) || (errno != 0 && i == 0 )) {
438437 throw base_s3select_exception (" converted value would fall out of the range of the result type!" );
439438 return false ;
440- }
439+ }
441440
442- if (*perr != ' \0 ' ) {
443- throw base_s3select_exception (" characters after int!" );
444- return false ;
441+ if (*perr != ' \0 ' ) {
442+ throw base_s3select_exception (" characters after int!" );
443+ return false ;
444+ }
445445 }
446- }
447446 else if (func_arg.type == value::value_En_t::FLOAT)
448447 {
449448 i = func_arg.dbl ();
@@ -488,8 +487,8 @@ struct _fn_to_float : public base_function
488487 }
489488
490489 var_result = d;
491- break ;
492490 }
491+ break ;
493492
494493 case value::value_En_t::FLOAT:
495494 var_result = v.dbl ();
@@ -586,7 +585,7 @@ struct _fn_to_timestamp : public base_function
586585
587586 bsc::parse_info<> info_dig = bsc::parse (v_str.str (), d_yyyymmdd_dig >> *(separator) >> d_time_dig);
588587
589- if (!datetime_validation () or !info_dig.full )
588+ if (!datetime_validation () || !info_dig.full )
590589 {
591590 throw base_s3select_exception (" input date-time is illegal" );
592591 }
0 commit comments