Embolden by earlier's success, I decided to check out if Arrow methods worked.
I wrote a script to create an Arrow vector. The main interest of that code is: it's a good reminder of how verbose Java can be. As such, it's contents are omitted. However, there is something that bit me. You need to generate a full Arrow's VectorSchemaRoot. If you just try to load, say, an IntVector, DuckDB will throw an error, as it seems to require a Schema.
The other relevant bit regarding this setup is: if you want to use Arrow, you have to set the --add-opens JDK variable. I have not found a way to do this directly with scala-cli. Thus I have this config script.
With Arrow properly configured and vector saved to disk, we can replicate this section of DuckDB's docs, using ScalaSQL. We define again our table as a case class. Then load and register the Arrow vector into the database. Finally, we can query our vector using ScalaSQL. Find the code in ArrowTest.scala