<div dir="auto"><div>Thanks Even, that helps a lot.<div dir="auto"><br></div><div dir="auto">Chris </div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, May 11, 2026, 2:50 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris,<br>
> I'm trying to understand implications of OGRLayer::WriteArrowBatch():<br>
><br>
>> This method and CreateFeature() are mutually exclusive in the same session.<br>
> The context is binding code where the user could potentially call<br>
> either of these methods at any point during the session.<br>
><br>
> Does "session" refer to the layer or dataset instance, or the GDAL<br>
> session itself?<br>
Dataset and layer instances<br>
><br>
> In tests with GPKG, using WriteArrowBatch() followed by<br>
> CreateFeature() worked and didn't cause any obvious problems.<br>
yes, because for that driver (actually all drivers except <br>
Parquet&Arrow), WriteArrowBatch() results in CreateFeature() behind the <br>
hood. But you'd likely hit issues on Parquet or Arrow datasets, for <br>
which implementation limitations lead to the general restriction. And <br>
as we have nothing in the test suite that checks that mixing <br>
WriteArrowBatch() & CreateFeature() works even for code where it is OK <br>
currently, you could be exposed to potential regressions if the <br>
implementation changed in the future.<br>
> Should<br>
> binding code guard against this in general?<br>
I'd say up to you. The SWIG bindings don't for example.<br>
><br>
> Similarly, CreateFieldFromArrowSchema() and CreateField() are mutually<br>
> exclusive in the same session. Is there any issue with using<br>
> CreateField() and WriteArrowBatch() in the same session?<br>
<br>
Same as above w.r.t Arrow/Parquet driver. The feature writing logic <br>
between the Arrow and per-feature strategies takes different code paths. <br>
I don't say reconciling them would be impossible, but clearly an <br>
implementation complication as I didn't see the point in supporting <br>
mixed workflows.<br>
<br>
Even<br>
<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
</blockquote></div></div></div>