<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 09/05/2011 12:40, Wolfgang Laun wrote:
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"><br>
So I take it that all of these permit indexing:<br>
<fieldname> == <literal><br>
</blockquote>
yes<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"> <fieldname> == <variable><br>
</blockquote>
yes<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"> <fieldname> == <qualified-identifier><br>
</blockquote>
yes<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"> <fieldname> == <expression> # not
necessarily parenthesized any more!<br>
</blockquote>
no, not yet, but will do eventually. We can only indexed direct
accessors at the moment - pure literals and variables. No different
than other 5.x releases. Over time we hope to improve what can be
indexed.<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite">
as well as the same using "!=".<br>
</blockquote>
It's not possible to indexed !=<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"><br>
But the following does not permit indexing: <br>
<any RHS expression from above> == <fieldname><br>
</blockquote>
I don't understand this question as there is no join process in the
RHS, and thus no possible indexing.<br>
<br>
Mark<br>
<blockquote
cite="mid:BANLkTinikR727AX=wiRWZDLvufOd4K4M5Q@mail.gmail.com"
type="cite"><br>
Correct?<br>
<br>
-W<br>
<br>
<br>
<div class="gmail_quote">On 9 May 2011 03:55, Mark Proctor <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
<div text="#000000" bgcolor="#ffffff">
<div class="im"> On 06/05/2011 07:14, Wolfgang Laun wrote:
<blockquote type="cite">Edson,<br>
<br>
On 6 May 2011 01:14, Edson Tirelli <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ed.tirelli@gmail.com" target="_blank">ed.tirelli@gmail.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left:
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
0.8ex; padding-left: 1ex;">
<div><br>
</div>
Wolfgang,
<div><br>
</div>
<div> These are remaining bugs that must be fixed
before final. Goal is to support free form
expressions as long as they return a boolean value
(for traditional constraints), or any value (for
positional). Period.</div>
</blockquote>
<div><br>
(Well, as it's past 5.2.0M2...)<br>
<br>
Given that any expression is valid, will there still
be a distinction w.r.t. efficiency, as there was
with traditional constraints as opposed to eval()?
If yes, how can I tell whether a constraint
expression is "good" or "bad"? <br>
</div>
</div>
</blockquote>
</div>
Only expressions that are equality constraints on direct
fields are currently indexed.<br>
<br>
Mark<br>
<blockquote type="cite">
<div>
<div class="h5">
<div class="gmail_quote">
<div> <br>
One might assume that all legacy forms will be
handled as efficiently as now, but it's possible
that not only<br>
field == ($var + 1)<br>
but also<br>
field == $var + 1<br>
is efficient. Or, similarly,<br>
field == $var<br>
and (now) also<br>
$var == field<br>
<br>
But certainly not<br>
field - 1 == $var<br>
Or, at least, not until some later version ;-)<br>
<br>
I repeat this quote (from 5.2.0<font><font
size="2"><a moz-do-not-send="true"> Drools
Introduction and General User Guide) </a></font></font>and
my question, what does it mean? Where is this
"documented"? Is this somehow related to the
efficiency issue? <br>
<br>
<a moz-do-not-send="true"><quote><br>
</a><a moz-do-not-send="true">As previously we had
to document the restricted limitations of a
field constraint on the LHS compared to
expressions used inside of an 'eval' or used on
the RHS.</a><a moz-do-not-send="true"><br>
</quote></a><br>
<br>
Wolfgang<br>
<br>
</div>
<blockquote class="gmail_quote" style="border-left:
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
0.8ex; padding-left: 1ex;">
<div><br>
</div>
<div> Edson<br>
<br>
<div class="gmail_quote">
<div>
<div>2011/5/5 Wolfgang Laun <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:wolfgang.laun@gmail.com"
target="_blank">wolfgang.laun@gmail.com</a>></span><br>
</div>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204,
204); margin: 0pt 0pt 0pt 0.8ex;
padding-left: 1ex;">
<div>
<div>
<h1 style="font-weight: normal;"><font
size="2"><a moz-do-not-send="true">In
the 5.2.0 Drools Introduction and
General User Guide</a>, there's
section 2.1.3.1, Free Form
expressions in Constraints (New
Parser). It contains several
examples:</font><br>
</h1>
#1 Person( age * 2 >
$anotherPersonsAge + 2 ) <br>
#2 Person(
addresses["home"].streetName.startsWith(
"High Park" ) )<br>
#3 Person( isAdult() )<br>
<br>
#1 does not compile: Unable to build
constraint as 'age * 2' is invalid :
[Rule name='exa1']<br>
<br>
#2 works - although I'd very much prefer
not to be swamped with MVEL extensions
unless I ask for it.<br>
<br>
#3 does not compile: Unable to Analyse
Expression isAdult():<br>
[Error: no such identifier: isAdult]<br>
[Near : {... isAdult() ....}]<br>
<br>
Neither rule name nor line number is
provided.<br>
<br>
Would it please be possible to have a
precise statement what one <i>can</i>
write as a constraint?<br>
<a moz-do-not-send="true"><br>
<br>
<quote><br>
</a><a moz-do-not-send="true">As
previously we had to document the
restricted limitations of a field
constraint on the LHS compared to
expressions used inside of an 'eval'
or used on the RHS.</a><a
moz-do-not-send="true"><br>
</quote><br>
<br>
I'm sorry, but I do not understand the
meaning of this sentence. What does it
mean, please?<br>
<br>
Cheers<br>
Wolfgang<br>
</a><br>
</div>
</div>
</blockquote>
</div>
</div>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
rules-dev mailing list
<a moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>