Commit cc7116d
committed
bug-fix: Fix pstmt.execute() return for DML/DDL
What's Changed
Instead of always obtaining a result set for queries issued via
PreparedStatement.execute(), we now inspect the dataset_schema
returned in ActionCreatePreparedStatementResult. If the schema has no
fields, we retrieve the update count instead. This aligns the return
value with the expectations of the JDBC API.
For such cases, the Arrow Flight SQL path now uses
CommandPreparedStatementUpdate instead of
CommandPreparedStatementQuery. This change mirrors the existing
approach in Statement.execute() and Statement.executeUpdate().1 parent e4f6426 commit cc7116d
File tree
1 file changed
+7
-3
lines changed- flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc
1 file changed
+7
-3
lines changedLines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | | - | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
0 commit comments