Subtle bug that occurred selecting after a join

Outer joins add the placeholder '---' that is used as some sort of NULL
value.

However select operations on such relations would always fail, because
relations are supposed to only contain values of class rstring, and
the placeholder was added as a regular string.

As a consequence, automatic casting would always fail, and the select
would always raise an exception.

Added a new test case with this specific case in mind.
master
Salvo 'LtWorf' Tomaselli 2015-09-10 12:19:51 +07:00
parent f7ac34b761
commit d597076038
4 changed files with 5 additions and 1 deletions

@ -6,6 +6,7 @@
- Introduced sessions; GUI loads the same relations of the previous time
- GUI is modified, to be fit smaller screens
- Fix bug in tokenizer
- Fixed bug where select on relations with '---' values would always fail
2.0
- Fix bug in relational-cli that made it crash when an exception was raised

@ -323,7 +323,7 @@ class Relation (object):
added = True
# If it didn't partecipate, adds it
if not added:
item = chain(i, repeat('---', len(noid)))
item = chain(i, repeat(rstring('---'), len(noid)))
newt.content.add(tuple(item))
return newt

@ -0,0 +1 @@
σ id==3(people ⧓ skills)

@ -0,0 +1,2 @@
id,skill,name,chief,age
3,C++,dean,1,33