Code

Opened 5 years ago

Closed 5 years ago

#10161 closed (fixed)

Fix F expressions with Oracle

Reported by: ikelly Owned by: ikelly
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Attachments (2)

10161-r9848.diff (5.1 KB) - added by russellm 5 years ago.
First cut at a patch to fix Oracle expression problems
10161-r9888.diff (5.7 KB) - added by ikelly 5 years ago.
Went ahead and added a NotImplementedError for '|'

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by russellm

First cut at a patch to fix Oracle expression problems

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Ian - I'm pretty sure this will fix the Oracle problems; if you can confirm that the expression tests pass with this patch, I'll commit it.

comment:2 Changed 5 years ago by ikelly

  • Has patch set

I had to make a few minor changes to get it to work, so I uploaded a new patch with those changes. All the expressions and expressions_regress tests pass.

I think we should also smack the user with a more useful error message if they try to use bit-wise or in Oracle. The current error message is rather confusing: DatabaseError: ORA-00996: the concatenate operator is ||, not |.

Changed 5 years ago by ikelly

Went ahead and added a NotImplementedError for '|'

comment:3 Changed 5 years ago by Alex

IMO it should just handle | using the fancy bit arithmatic you mentioned, it's minimal overhead(or more accurately it's only overhead if you are using oracle and the | operator) but it just adds to the flexibility.

comment:4 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [9898]) Fixed #10161 -- Modified evaluation of query expressions to allow for operators that take the form of functions. This is mostly for the benefit of Oracle, but it should prove useful later on. Thanks to Ian for the report and feedback on the fix.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.