LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[LDB-132] NPE if date is null in APPLIB.DAY_FROM_JULIAN_START (date) #189

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="schoi", created="Fri, 1 Sep 2006 11:15:27 -0500 (GMT-05:00)"] ... should return null instead

dynamobi-build commented 12 years ago

[author="jvs", created="Fri, 1 Sep 2006 12:42:39 -0500 (GMT-05:00)"] You can use the RETURNS NULL ON NULL INPUT clause in the DDL to avoid having to check all params within Java. (Default is CALLED ON NULL INPUT).

dynamobi-build commented 12 years ago

[author="schoi", created="Fri, 1 Sep 2006 13:39:51 -0500 (GMT-05:00)"] So now I get this:

Error: org.codehaus.janino.util.TunnelException: org.codehaus.janino.util.TunnelException: File /home/schoi/open/luciddb/./classes/net/sf/farrago/dynamic/stmt32141/ExecutableStmt.java, Line 88, Column 54: "void" has no field "isNull" (state=,code=0)


-- repro:

set schema 'applib';
set path 'applib';

create function applib.day_number_overall2(dt Date)
returns integer
language java
specific DAYNUMBEROVERALL_DATE2
no sql
returns null on null input
external name 'applib.applibJar:com.lucidera.luciddb.applib.datetime.DayNumberOverallUdf.execute';

create function applib.day_from_julian_start2(dt Date)
returns integer
language sql
contains sql
returns null on null input
return (
  applib.day_number_overall2(dt) + 2440588
);

values APPLIB.DAY_FROM_JULIAN_START2 (cast (null as date));

dynamobi-build commented 12 years ago

[author="schoi", created="Fri, 1 Sep 2006 13:48:27 -0500 (GMT-05:00)"] LDB-134 filed for the last part. I'll fix it in the java code for this.

dynamobi-build commented 12 years ago

[author="schoi", created="Fri, 1 Sep 2006 15:17:01 -0500 (GMT-05:00)"] change# 7530