44#include < csignal>
55#include < iostream>
66#include < filesystem>
7+ #include < regex>
78#include < vector>
89#include < arrow/flight/client.h>
910#include < arrow/flight/sql/server.h>
@@ -26,12 +27,15 @@ const int port = 31337;
2627#define RUN_INIT_COMMANDS (serverType, init_sql_commands ) \
2728do { \
2829if (init_sql_commands !=" " ) { \
29- std::vector<std::string> tokens; \
30- boost::split (tokens, init_sql_commands,boost::is_any_of (" ;" )); \
31- for (const std::string &init_sql_command: tokens) { \
30+ std::regexregex_pattern (" ;(?=(?:[^']*'[^']*')*[^']*$)" ); \
31+ std::sregex_token_iteratoriter (init_sql_commands.begin (), init_sql_commands.end (), regex_pattern, -1 ); \
32+ std::sregex_token_iterator end; \
33+ while (iter != end) { \
34+ std::string init_sql_command = *iter; \
3235if (init_sql_command.empty ())continue ; \
3336 std::cout <<" Running Init SQL command:" << std::endl << init_sql_command <<" ;" << std::endl; \
3437ARROW_RETURN_NOT_OK (serverType->ExecuteSql (init_sql_command)); \
38+ ++iter; \
3539 } \
3640 } \
3741 }while (false )