[jOOQ/jOOQ#14373] Parser produces wrong projection data type when

parsing doubly nested derived table
This commit is contained in:
Lukas Eder 2022-12-06 14:10:25 +01:00
parent c0c1aa4e13
commit 45882adcf3

View File

@ -120,13 +120,16 @@ final class DataTypeProxy<T> extends AbstractDataType<T> {
final void type(AbstractDataType<T> t) {
if (t instanceof DataTypeProxy<T> p) {
// [#11856] [#14343] Prevent cycles in DataTypeProxy chains
// [#11856] [#14343] [#14373] Prevent cycles in DataTypeProxy chains
IdentityHashMap<AbstractDataType<?>, AbstractDataType<?>> m = new IdentityHashMap<>();
m.put(this, this);
m.put(p, p);
while (p.type() instanceof DataTypeProxy<T> p2) {
if (m.put(p2, p2) != null)
return;
p = p2;
}
}