zeroshade commented on code in PR #3808:
URL: https://github.com/apache/arrow-adbc/pull/3808#discussion_r2659917657


##########
go/adbc/driver/flightsql/flightsql_statement.go:
##########
@@ -360,6 +380,53 @@ func (s *statement) SetOption(key string, val string) 
error {
                                Code: adbc.StatusInvalidArgument,
                        }
                }
+       case adbc.OptionKeyIngestTargetTable:
+               if s.prepared != nil {
+                       if err := s.closePreparedStatement(); err != nil {
+                               return err
+                       }
+                       s.prepared = nil
+               }
+               s.query.sqlQuery = ""
+               s.query.substraitPlan = nil
+               s.targetTable = val
+       case adbc.OptionKeyIngestMode:
+               switch val {
+               case adbc.OptionValueIngestModeCreate,
+                       adbc.OptionValueIngestModeAppend,
+                       adbc.OptionValueIngestModeReplace,
+                       adbc.OptionValueIngestModeCreateAppend:
+                       s.ingestMode = val
+               default:
+                       return adbc.Error{
+                               Msg:  fmt.Sprintf("[Flight SQL] Invalid ingest 
mode '%s'", val),
+                               Code: adbc.StatusInvalidArgument,
+                       }
+               }
+       case adbc.OptionValueIngestTargetCatalog:

Review Comment:
   Fair enough. That's fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to