Unable to find most specific common supertype
Posted: Thu Jan 18, 2018 10:19 pm
While trying to assign a tuple to a relvar I got the following error (with crash report):
ERROR: RS0383: Unable to find most specific common supertype.
Line 1052, column 179 near ''Comarca de San Blas''
org.reldb.rel.exceptions.ExceptionFatal: RS0383: Unable to find most specific common supertype.
Line 1052, column 179 near ''Comarca de San Blas''
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:222)
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:234)
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:238)
at org.reldb.rel.v0.engine.Rel$2.execute(Rel.java:131)
at org.reldb.rel.v0.engine.Rel.send(Rel.java:85)
at org.reldb.rel.v0.engine.Rel.sendExecute(Rel.java:129)
at org.reldb.rel.Rel.sendExecute(Rel.java:88)
at org.reldb.rel.client.connection.stream.ClientLocalConnection.sendExecute(ClientLocalConnection.java:39)
at org.reldb.rel.client.connection.string.ClientLocal.sendExecute(ClientLocal.java:57)
at org.reldb.dbrowser.ui.content.cmd.ConcurrentStringReceiverClient$1.doQuery(ConcurrentStringReceiverClient.java:163)
at org.reldb.dbrowser.ui.content.cmd.ConcurrentStringReceiverClient$Runner.lambda$2(ConcurrentStringReceiverClient.java:130)
at java.lang.Thread.run(Thread.java:748)
Cancel.
This is the line where the error is thrown:
TUPLE {Province PROVINCENAME('Comarca de San Blas'), Country COUNTRY('PA'), Population NOINTDATA(), Area INTDATA(2357), Capital CITYNAME('El Porvenir'), CapProv PROVINCENAME('Comarca de San Blas')}
The structure of the relvar looks like this:
VAR Province REAL RELATION {
Province PROVINCE,
Country COUNTRY,
Population INTEGERTYPE,
Area INTEGERTYPE,
Capital CITY,
CapProv PROVINCE
} KEY {Province, Country};
And if needed, here are the definition of the created types:
TYPE PROVINCE UNION;
TYPE PROVINCENAME IS {
PROVINCE POSSREP {
Province CHAR
}
};
TYPE NOPROVINCE IS {
PROVINCE POSSREP {}
};
TYPE COUNTRY POSSREP {
Country CHAR
};
TYPE INTEGERTYPE UNION;
TYPE INTDATA IS {
INTEGERTYPE POSSREP {
Number INTEGER
}
};
TYPE NOINTDATA IS {
INTEGERTYPE POSSREP {}
};
TYPE CITY UNION;
TYPE CITYNAME IS {
CITY POSSREP {
City CHAR
}
};
TYPE NOCITY IS {
CITY POSSREP {}
};
It's not the only tuple that causes an error, there are several other tuples at other relvars that cause this type of error.
I hope the error description is sufficent for you to be able to fix this problem.
ERROR: RS0383: Unable to find most specific common supertype.
Line 1052, column 179 near ''Comarca de San Blas''
org.reldb.rel.exceptions.ExceptionFatal: RS0383: Unable to find most specific common supertype.
Line 1052, column 179 near ''Comarca de San Blas''
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:222)
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:234)
at org.reldb.rel.v0.interpreter.Interpreter.interpret(Interpreter.java:238)
at org.reldb.rel.v0.engine.Rel$2.execute(Rel.java:131)
at org.reldb.rel.v0.engine.Rel.send(Rel.java:85)
at org.reldb.rel.v0.engine.Rel.sendExecute(Rel.java:129)
at org.reldb.rel.Rel.sendExecute(Rel.java:88)
at org.reldb.rel.client.connection.stream.ClientLocalConnection.sendExecute(ClientLocalConnection.java:39)
at org.reldb.rel.client.connection.string.ClientLocal.sendExecute(ClientLocal.java:57)
at org.reldb.dbrowser.ui.content.cmd.ConcurrentStringReceiverClient$1.doQuery(ConcurrentStringReceiverClient.java:163)
at org.reldb.dbrowser.ui.content.cmd.ConcurrentStringReceiverClient$Runner.lambda$2(ConcurrentStringReceiverClient.java:130)
at java.lang.Thread.run(Thread.java:748)
Cancel.
This is the line where the error is thrown:
TUPLE {Province PROVINCENAME('Comarca de San Blas'), Country COUNTRY('PA'), Population NOINTDATA(), Area INTDATA(2357), Capital CITYNAME('El Porvenir'), CapProv PROVINCENAME('Comarca de San Blas')}
The structure of the relvar looks like this:
VAR Province REAL RELATION {
Province PROVINCE,
Country COUNTRY,
Population INTEGERTYPE,
Area INTEGERTYPE,
Capital CITY,
CapProv PROVINCE
} KEY {Province, Country};
And if needed, here are the definition of the created types:
TYPE PROVINCE UNION;
TYPE PROVINCENAME IS {
PROVINCE POSSREP {
Province CHAR
}
};
TYPE NOPROVINCE IS {
PROVINCE POSSREP {}
};
TYPE COUNTRY POSSREP {
Country CHAR
};
TYPE INTEGERTYPE UNION;
TYPE INTDATA IS {
INTEGERTYPE POSSREP {
Number INTEGER
}
};
TYPE NOINTDATA IS {
INTEGERTYPE POSSREP {}
};
TYPE CITY UNION;
TYPE CITYNAME IS {
CITY POSSREP {
City CHAR
}
};
TYPE NOCITY IS {
CITY POSSREP {}
};
It's not the only tuple that causes an error, there are several other tuples at other relvars that cause this type of error.
I hope the error description is sufficent for you to be able to fix this problem.