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.
This commit is contained in:
parent
f7ac34b761
commit
d597076038
@ -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
|
||||
|
1
test/select_join.query
Normal file
1
test/select_join.query
Normal file
@ -0,0 +1 @@
|
||||
σ id==3(people ⧓ skills)
|
2
test/select_join.result
Normal file
2
test/select_join.result
Normal file
@ -0,0 +1,2 @@
|
||||
id,skill,name,chief,age
|
||||
3,C++,dean,1,33
|
Loading…
Reference in New Issue
Block a user