Re: [h2] MVStore and interrupts?

2018-06-28 Thread Dan
Yea, a quick search of my classpath shows about 5 different libraries doing an interrupt at one point or another, and I'm not even sure yet which one was biting me. I'm not trying to use H2, I'm just trying to use the MVStore directly. The MVStore jar package doesn't contain the classes

[h2] Re: Date_trunc function and ResultSetMetaData getColumnType() problem

2018-06-28 Thread Pedro Almeida
Thank you for the answer. I am looking at the source code H2 more specific Function.java and I see that a couple of functions are initially set with Value.NULL (since at that time the return data type is not known) Although there is a method called optimize that is used that for some

[h2] Re: Date_trunc function and ResultSetMetaData getColumnType() problem

2018-06-28 Thread Evgenij Ryazanov
Hello. This function in H2 does not have exact return type, it may return TIMESTAMP, TIMESTAMP WITH TIME ZONE, DATE, or TIME depending on type of the second argument. That's why its return type is not defined. You can add an explicit cast. SELECT CAST(DATE_TRUNC('MONTH', column) AS TIMESTAMP)

[h2] Date_trunc function and ResultSetMetaData getColumnType() problem

2018-06-28 Thread Pedro Almeida
Hi, I am using H2 version "1.4.197" While trying to get the column type with ResultSetMetaData getColumnType() of a query like: SELECT date_trunc('MONTH', "Date_Column") I get the value 0 (Null as defined in JDBC Types) Pedro -- You received this message because you are subscribed to the

Re: [h2] MVStore and interrupts?

2018-06-28 Thread Thomas Mueller Graf
Hi, > not interrupting is easier said than done with other libraries. Yes... One case, that was biting us, is using java.util.concurrent.ExecutorService.shutdownNow(). This was calling Thread.interrupt() in our case. It was relatively easy to resolve: now we use shutdown() instead. See

Re: [h2] MVStore and interrupts?

2018-06-28 Thread Noel Grandin
On 2018/06/28 9:59 AM, Dan wrote: I've been going down this road: https://github.com/h2database/h2database/issues/227 trying to figure out how to work around interrupts with MVStore. Everyone just says use 'retry' or don't interrupt... not interrupting is easier said than done with other

Re: [h2] MVStore and interrupts?

2018-06-28 Thread Thomas Mueller Graf
Hi, Try this: "retry:nio:" + ... See also TestConcurrent.testInterruptReopen() (It would be good to improve documentation for this I guess). Regards, Thomas On Thu, Jun 28, 2018 at 9:59 AM Dan wrote: > I've been going down this road: > https://github.com/h2database/h2database/issues/227

[h2] MVStore and interrupts?

2018-06-28 Thread Dan
I've been going down this road: https://github.com/h2database/h2database/issues/227 trying to figure out how to work around interrupts with MVStore. Everyone just says use 'retry' or don't interrupt... not interrupting is easier said than done with other libraries. I can't figure out the