Here is a curious test case that seems like a bug.
CREATE TABLE T1 (COL INT);
INSERT INTO T1 VALUES(500);
SELECT *
FROM (
SELECT CAST(86400000 AS BIGINT) * COL AS MY_BIGINT_COLUMN
FROM T1
);
--> WORKS
SELECT *
FROM (
SELECT *
FROM (
SELECT CAST(86400000 AS BIGINT) * COL AS MY_BIGINT_COLUMN
FROM T1
)
);
--> ERROR
SELECT *
FROM (
SELECT *
FROM (
SELECT CAST(86400000 AS BIGINT) * CAST(COL AS BIGINT) AS
MY_BIGINT_COLUMN
FROM T1
)
);
--> WORKS AGAIN
> No, we want to avoid expanding types unnecessarily.
What type of situation would you consider necessary?
Java seems to think that a type can automatically be cast into it's
supertype.
> That's pretty normal in most languages that value some degree of
performance.
How would expanding the expressions type from int to long be a
performance bottleneck?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.