shamim8888 / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Null and true #861

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the problem?
The left outer join operator behaves strangely if the clause `AND TRUE` is 
added to its condition. It adds extra nulls for no apparent reason.

What steps will reproduce the problem?
Need to use Asterix-SQL++ language for an easy example or fabricate an example 
programmatically. I have tried to reproduce the problem using AQL but its not 
easy given AQL only uses the left-outer-join operator when rewriting and 
usually follows up with an aggregation.

SQL++ Query :

use dataverse TinySocial;
select user.name as name, message.message as message
from FacebookUsers as user
left outer join FacebookMessages as message
on user.id = message.author-id and true;

What is the expected output?

{ "name": "MargaritaStoddard", "message": " dislike iphone its touch-screen is 
horrible" }
{ "name": "MargaritaStoddard", "message": " like verizon the 3G is awesome:)" }
{ "name": "MargaritaStoddard", "message": " can't stand motorola the 
touch-screen is terrible" }
{ "name": "MargaritaStoddard", "message": " can't stand at&t the network is 
horrible:(" }
{ "name": "MargaritaStoddard", "message": " can't stand at&t its plan is 
terrible" }
{ "name": "IsbelDull", "message": " like samsung the plan is amazing" }
{ "name": "IsbelDull", "message": " like t-mobile its platform is mind-blowing" 
}
{ "name": "NilaMilliron", "message": null }
{ "name": "WoodrowNehling", "message": " love at&t its 3G is good:)" }
{ "name": "BramHatch", "message": " dislike iphone the voice-command is bad:(" }
{ "name": "BramHatch", "message": " can't stand t-mobile its voicemail-service 
is OMG:(" }
{ "name": "EmoryUnk", "message": " love sprint its shortcut-menu is awesome:)" }
{ "name": "EmoryUnk", "message": " love verizon its wireless is good" }
{ "name": "WillisWynne", "message": " love sprint the customization is 
mind-blowing" }
{ "name": "SuzannaTillson", "message": " like iphone the voicemail-service is 
awesome" }
{ "name": "NicholasStroh", "message": null }
{ "name": "VonKemble", "message": " dislike sprint the speed is horrible" }

What do you see instead?

{ "name": "NicholasStroh", "message": null }
{ "name": "VonKemble", "message": null }
{ "name": "MargaritaStoddard", "message": " dislike iphone its touch-screen is 
horrible" }
{ "name": "MargaritaStoddard", "message": " like verizon the 3G is awesome:)" }
{ "name": "MargaritaStoddard", "message": " can't stand motorola the 
touch-screen is terrible" }
{ "name": "IsbelDull", "message": null }
{ "name": "NilaMilliron", "message": null }
{ "name": "WoodrowNehling", "message": null }
{ "name": "BramHatch", "message": " dislike iphone the voice-command is bad:(" }
{ "name": "EmoryUnk", "message": " love sprint its shortcut-menu is awesome:)" }
{ "name": "EmoryUnk", "message": " love verizon its wireless is good" }
{ "name": "WillisWynne", "message": null }
{ "name": "SuzannaTillson", "message": null }
{ "name": "NicholasStroh", "message": null }
{ "name": "VonKemble", "message": " dislike sprint the speed is horrible" }
{ "name": "MargaritaStoddard", "message": null }
{ "name": "IsbelDull", "message": " like samsung the plan is amazing" }
{ "name": "IsbelDull", "message": " like t-mobile its platform is mind-blowing" 
}
{ "name": "NilaMilliron", "message": null }
{ "name": "WoodrowNehling", "message": null }
{ "name": "BramHatch", "message": " can't stand t-mobile its voicemail-service 
is OMG:(" }
{ "name": "EmoryUnk", "message": null }
{ "name": "WillisWynne", "message": null }
{ "name": "SuzannaTillson", "message": null }
{ "name": "MargaritaStoddard", "message": " can't stand at&t the network is 
horrible:(" }
{ "name": "MargaritaStoddard", "message": " can't stand at&t its plan is 
terrible" }
{ "name": "IsbelDull", "message": null }
{ "name": "NilaMilliron", "message": null }
{ "name": "WoodrowNehling", "message": " love at&t its 3G is good:)" }
{ "name": "BramHatch", "message": null }
{ "name": "NicholasStroh", "message": null }
{ "name": "VonKemble", "message": null }
{ "name": "EmoryUnk", "message": null }
{ "name": "WillisWynne", "message": " love sprint the customization is 
mind-blowing" }
{ "name": "SuzannaTillson", "message": " like iphone the voicemail-service is 
awesome" }

What version of the product are you using? On what operating system?
Latest master branch on Mac OS X.

Please provide any additional information below.

Original issue reported on code.google.com by jtest...@eng.ucsd.edu on 9 Mar 2015 at 7:10