simlaudato / asterixdb

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

Return record has a null value from functions evaluation #865

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run this query: 
for $i in [interval-from-time(time("11:11:11"), time("12:11:11")), 
interval-from-time(time("22:22:22"), time("23:22:22"))]
return { "interval": $i, "overlap": get-overlapping-interval($i, 
interval-from-time(time("11:41:11"), time("12:41:11"))) }

What is the expected output? 
{ "interval": interval-time("11:11:11.000Z, 12:11:11.000Z"), "overlap": 
interval-time("11:41:11.000Z, 12:11:11.000Z") }
{ "interval": interval-time("22:22:22.000Z, 23:22:22.000Z"), "overlap": null }
or 
{ "interval": interval-time("11:11:11.000Z, 12:11:11.000Z"), "overlap": 
interval-time("11:41:11.000Z, 12:11:11.000Z") }
{ "interval": interval-time("22:22:22.000Z, 23:22:22.000Z") }

What do you see instead?
Unsupport internal time types in interval: 0 [AlgebricksException]
Please use labels and text to provide additional information.

The open record result becomes a closed record and then does not allow field 
null values returned from the function.

Original issue reported on code.google.com by ecarm...@ucr.edu on 19 Mar 2015 at 4:41

GoogleCodeExporter commented 8 years ago
Found that type computer was checking for null input and ignored the option for 
null function output.

Original comment by ecarm...@ucr.edu on 24 Mar 2015 at 7:40