Skip to content

Commit dd0cd5b

Browse files
committed
chore: add warn for execute_update impl of go and python
1 parent 0568fa3 commit dd0cd5b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

go/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,17 @@ func main() {
162162
INSERT INTO go.demo (ts, sid, value, flag) VALUES
163163
('2024-09-03T10:00:00+08:00', 1, 4.5, 0),
164164
('2024-09-03T10:05:00+08:00', 2, 11.6, 1);`
165-
affectedRows, err := client.ExecuteUpdate(sql)
165+
_, err = client.ExecuteUpdate(sql)
166166
if err != nil {
167167
fmt.Println("Failed to insert data: ", err)
168168
return
169169
}
170+
// It's expected that the affected rows is 2.
171+
// However, the Go implementation of Arrow Flight SQL client might have some flaws and the affected rows is always 0.
172+
//
170173
// The output should be:
171174
// Affected rows: 2
172-
fmt.Println("Affected rows: ", affectedRows)
175+
// fmt.Println("Affected rows: ", affectedRows)
173176

174177
// Checks that the data are inserted successfully.
175178
sql = "SELECT * FROM go.demo where ts >= '2024-09-03T10:00:00+08:00'"

python/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def main():
115115
('2024-09-03T10:05:00+08:00', 2, 11.6, 1);
116116
"""
117117
#! It's expected that the affected rows is 2.
118-
#! However, the flightsql-dbapi library does not implement the `execute_update` correctly
118+
#! However, the flightsql-dbapi library seems does not implement the `execute_update` correctly
119119
#! and the returned affected rows is always 0.
120120
affected_rows = client.execute_update(sql)
121121
# The output should be:

0 commit comments

Comments
 (0)