Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit666b728

Browse files
authored
1 parent5326758 commit666b728

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎requirements.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ pandas==2.1.*
22
duckdb==0.10.1
33
click==8.1.*
44
pyarrow==15.0.2
5-
adbc-driver-flightsql==0.10.*
6-
adbc-driver-manager==0.10.*
5+
adbc-driver-flightsql==0.11.*
6+
adbc-driver-manager==0.11.*

‎src/library/flight_sql_library.cpp‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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
#defineRUN_INIT_COMMANDS(serverType, init_sql_commands) \
2728
do { \
2829
if (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; \
3235
if (init_sql_command.empty())continue; \
3336
std::cout <<"Running Init SQL command:" << std::endl << init_sql_command <<";" << std::endl; \
3437
ARROW_RETURN_NOT_OK(serverType->ExecuteSql(init_sql_command)); \
38+
++iter; \
3539
} \
3640
} \
3741
}while (false)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp