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


##########
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:
   hi @zeroshade - I think that having the cleanup for the target table is 
sufficient, b/c it is a mandatory key for bulk ingestion.  Is it ok the way it 
is?



-- 
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