Ebean support for Trino

21 views
Skip to first unread message

buck...@gmail.com

unread,
Sep 25, 2024, 3:56:26 PM9/25/24
to Ebean ORM
Hi,

I'd like to use EBean to write to iceberg tables using Trino JDBC driver which claims to be ANSI SQL compliant.  Ebean provided a list of supported databases here.  Trino is not one of them.  Can I use Ebean with Trino using a supported database dialect (e.g. Postgres)?

Thanks,

-Buck

Rob Bygrave

unread,
Sep 25, 2024, 9:13:18 PM9/25/24
to eb...@googlegroups.com
> Can I use Ebean with Trino using a supported database dialect (e.g. Postgres)?

I think we would be better off using H2Platform.

That is, Postgres specifically has great support for ARRAY types and importantly Array Binding using =ANY(?) ... and this is awesome and so with Ebean we absolutely want to use this with Postgres (and this is not strictly ANSI SQL I believe and more importantly isn't actually supported by any other database that I know of which is disappointing). This Postgres array binding feature is imo really important for performance in that it reduces the number of distinct query plans and effectively results in a better hit ratio for query plans and this can be really significant performance improvement. Postgres will spend less time calculating query plans, fewer distinct query plans reduces memory consumption etc.

So although Postgres is highly ANSI SQL compliant, with Ebean we really really like that Postgres =ANY(?) array binding and any other database is going to bork on that.

I'd suggest using H2 for the ebean platform / dialect as that is not going to use array binding and it's highly ANSI SQL compliant. The only question to me there is around LIMIT OFFSET vs ANSI SQL offset rows fetch next rows syntax as to whether Trino supports limit/offset.

It's almost like Ebean should have an ANSI platform for this case (which would be like H2Platform but use AnsiSqlRowsLimiter rather than LimitOffsetRowsLimiter, and standard ANSI SQL History support ).


Cheers, Rob.


--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ebean/abad8e92-453a-48f3-bdc1-742cceab8c37n%40googlegroups.com.

buck...@gmail.com

unread,
Oct 4, 2024, 9:04:06 AM10/4/24
to Ebean ORM
Rob, thank you for the suggestion.

Reply all
Reply to author
Forward
0 new messages