Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate, AggregateFunction, Trigger, and TriggerAdapter #2250

Open
katzyn opened this issue Nov 11, 2019 · 2 comments
Open

Aggregate, AggregateFunction, Trigger, and TriggerAdapter #2250

katzyn opened this issue Nov 11, 2019 · 2 comments

Comments

@katzyn
Copy link
Contributor

katzyn commented Nov 11, 2019

These interfaces have some problems.

  1. Values are converted to Java objects and some conversions are slow, buggy and may loss some information. TIME, DATE, and TIMESTAMP are especially affected, because default JDBC mapping use unreliable legacy datetime data types. I don't know what to do here. Value is not a part of API and this class and its subclasses are modified very often. JSR-310 data types can be used, but they also may loss some information, because H2 has a wider range of values to support the Instant data type properly.

  2. Data type information should use implementations of java.sql.SQLType instead of integer codes, because constants from Types don't cover types that aren't included into JDBC specification (even some data types from the SQL Standard aren't included), and Aggregate uses internal codes that are going to be changed. But we need to implement Add own enumeration of data types to API #2194 first.

  3. Aggregate and AggregateFunction aren't suitable for external on-disk results.

@grandinj
Copy link
Contributor

Note that none of these things is performance critical, nor are they typically used for extremely large result sets.

They are designed for simplicity, easy of use, and familiarity, so that people can implement their own custom tweaks to various things.

I'd hate to lose that when no-one is complaining about issues with these features.

@katzyn
Copy link
Contributor Author

katzyn commented Nov 11, 2019

I don't care about their performance, but they definitely have bugs with datetime data types and their usability is questionable.

On the other hand, I have a pure SQL triggers and functions in my to-do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants