History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: FNL-3
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: John Kalucki
Reporter: Julian Hyde
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Fennel

Calc programs do not output internationalized error messages

Created: 04/Dec/05 11:50 PM   Updated: 04/Jan/07 02:36 PM
Component/s: Calc
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
Calc programs do not output internationalized error messages. For example, the expression
  trim('x' || 'y' from 'abcde')
should yield a runtime error
  Invalid argument(s) for 'TRIM' function

The Java implementation of the function produces that error, but the C++ implementation instead produces

    could not calculate results for the following row:
    [ 0 ]
    Messages:
     [0]:PC=0 Code=22027

Both implementations should return the SQL error code, 22027.

The biggest challenge in fixing this bug is to share the error messages between the C++ and Java implementations. The fix could either generate error templates into the calculator program, or it could read the error messages from a C++ resource file.

The behavior of the C++ and Java implementations should be sufficiently similar to enable the same negative tests to be run on both.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Julian Hyde - 04/Dec/05 11:55 PM
After this bug is fixed, please remove the constant

  boolean SqlOperatorTests.issueFnl3Fixed = false;

and enable the corresponding code.

Julian Hyde - 04/Jan/07 02:34 PM
See email thread for discussion of the design options:

http://sourceforge.net/mailarchive/forum.php?thread_id=8223298&forum_id=33354

Julian Hyde - 04/Jan/07 02:36 PM
Email from John Sichi on 2007/1/3:

Since that time, John Pham has taken care of providing the row data context for the Java calc, although currently it's only getting logged, rather than being returned as a wrapping exception. (LucidDB uses it for producing reject row csv files from the Java calc.) He also recently put in support for Fennel code to be able to send error tuples to Java for logging; some of that may be of use if you decide to make the Fennel calc transmit just a code and an error tuple. (This is still
on lcs branch; LucidDB uses it for producing reject row csv files from ExecStreams such as unique constraint enforcement.)