Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 11.7(EOL)
-
None
-
None
Description
Table schema
create table table1(idi1 int not null, idf1 int not null); |
create table table2(idi2 int not null, idf2 int not null); |
create table table3(idi3 int not null, idf3 int not null); |
insert into table1 values(1,2); |
insert into table1 values(2,3); |
insert into table1 values(3,4); |
Problem description
Knowledge of ResultSet column nullability is crucial for convenient developer experience (application stability too).
I looked at the driver code associated with nullability, and it seems like driver reach nullability throw network protocol.
I found simple case, where driver fails with nullability:
var pStmt = connection.prepareStatement(""" |
select idi1, idi2, idi3
|
from table1 t1
|
left join table2 t2 on t1.idf1 = t2.idi2
|
inner join table3 t3 on t2.idf2 = t3.idi3
|
"""); |
 |
var metaData = pStmt.getMetaData();
|
Assertions.assertEquals(0, metaData.isNullable(1)); // return 0 |
Assertions.assertEquals(0, metaData.isNullable(2)); // return 1 |
Assertions.assertEquals(0, metaData.isNullable(3)); // return 0 |
So, Oracle give correct answer.