You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by Francisco Javier Cano Bailen <fj...@stratio.com> on 2014/09/16 11:51:48 UTC

New operator types. "<=" ">=" and "BETWEEN"

Hello,

Thanks Kasper for your first support.

Regarding the OperatorType, MetaModel provides:

EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"), GREATER_THAN(">"),
LESS_THAN("<"), IN("IN"),

If it is possible, I would like to implement "<=", ">="" and "BETWEEN"
operator types.

>From my first review and test, I'm going to write new code in:

FilterItem.java
- toSql method
- comparator method
OperatorType.java
- new OperatorType <= , >= and BETWEEN
Query.java
- BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand without
operator

>From your point of view, Do you have other ideas in mind?

Regards,

-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
Hi Francisco,

Your remarks, questions and assumptions all turn out correct. Very
impressive actually :-) On your last question about delegation and memory
processing, this makes me think that we should build a matrix in the Wiki
or so, of what capabilities each module has in this regard. It's very
useful information and an easy way to spot potential improvements in the
individual modules.

Kasper

2014-09-30 14:16 GMT+02:00 Francisco Javier Cano Bailen <fj...@stratio.com>
:

> Hello Kasper,
>
> Thanks for the provided information.
>
> I forked metamodel and I'm including the changes for
> https://issues.apache.org/jira/browse/METAMODEL-83 . I will perform a pull
> request when I commit the changes.
>
> -----
>
> I reviewed the modules and this is the log change:
>
> * CouchDB. No changes.Added new assertions for ">=" "<="
> * CSV: No changes.
> * ElasticSearch: No changes.
> * Excel: No changes.
> * FixedWith: No changes.
> * HBase: No changes.
> * JDBC: Added new assertions ">=" "<="
> DB2: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
> HSQLDB: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
> MySQL: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
> PostgreSQL: SQL Syntax <= and >= (rewriteFilterItem does not need to
> change)
> SQLServer: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
> * JSON: No changes.
> * MongoDB:
> Included $gte / $lte operators.
> * OpenOffice: HSQLDB: No changes.
> * pojo: No changes.
> * salesforce: No changes.
> * Spring: Delegate to context creation
> * sugarCrm: No changes.
> * XML: No changes.
>
> -----
>
> Following the modules review I would like to confirm how metamodel works
> regarding MEMORY VS DELEGATION processing (eg: group by):
>
> * CouchDB. Memory.
> * CSV: Memory.
> * ElasticSearch: Memory
> * Excel: Memory.
> * FixedWith: Memory.
> * HBase: Memory.
> * JDBC: Delegate to the driver.
> * JSON: Memory.
> * MongoDB: Partial delegate to the driver (PostProcessing).
> * OpenOffice: Delegate to the driver.
> * pojo: Memory.
> * salesforce: Delegate to the driver.
> * Spring: Delegate to context creation.
> * sugarCrm: Memory.
> * XML: Memory.
>
> Do you want me to open a new topic in metamodel-dev mailing list to manage
> the question?
>
> Regards,
>
> 2014-09-29 15:45 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> > Hi Francisco,
> >
> > Good that you ask how to do this, and excuse us if we haven't been good
> > enough in communicating it (should get this info into our CONTRIBUTE.md
> > file).
> >
> > As a contributor it is best if you can do two things:
> >
> > 1) Make a JIRA about your contribution, that is really a great way to
> > consolidate the communication on a issue
> > 2) Share your patch in one form or the other. We currently have a few
> ways:
> > You can either post it as a diff on our review board [1] or you can make
> a
> > pull request towards our GitHub mirror [2].
> >
> > Best regards,
> > Kasper
> >
> > [1] https://reviews.apache.org/groups/metamodel/
> > [2] https://github.com/apache/incubator-metamodel/tree/master
> >
> >
> > 2014-09-29 14:22 GMT+02:00 Francisco Javier Cano Bailen <
> > fjcano@stratio.com>
> > :
> >
> > > Hello Kasper,
> > >
> > > To apply the change:
> > >
> > > 1. I modified the core (Operator and Filter classes (new methods
> > > greaterThanOrEquals/lessThanOrEquals in FilterBuilder))
> > > 2. MongoDbDataContext
> > >
> > > Now I'm working about CouchDB and reviewing other modules (dialects).
> > >
> > > Do you want me to open a Jira request? How are you managing this kind
> of
> > > changes? Do we need a new fork from master / new git branch from
> master?
> > >
> > > Regards,
> > >
> > >
> > > 2014-09-19 13:01 GMT+02:00 Kasper Sørensen <
> > i.am.kasper.sorensen@gmail.com
> > > >:
> > >
> > > > Hi Francisco,
> > > >
> > > > I imagine those are much easier to handle. Previously you posted a
> > > "recipe"
> > > > which I think applies very well. Then a small review of MongoDB,
> > CouchDB
> > > > and maybe a few other modules might be needed. But all in all I think
> > it
> > > > sounds pretty easy.
> > > >
> > > > Testing-wise, it should be tested for the JdbcModule and some quick
> > > > research on SQL dialects might be needed - but I think all dialects
> use
> > > the
> > > > same notation (">=" and "<="... I hope not "=>" and "=<"). Give it a
> > try
> > > > and we will give you some feedback! :-)
> > > >
> > > > Kasper
> > > >
> > > > 2014-09-18 17:25 GMT+02:00 Francisco Javier Cano Bailen <
> > > > fjcano@stratio.com>
> > > > :
> > > >
> > > > > Hello,
> > > > >
> > > > > Sorry, I wrote an unclear comment. I meant, BETWEEN will not
> > implement
> > > > > because you are right we have an ambiguous behavior among different
> > DB.
> > > > But
> > > > > It will be useful if we include ">=" and "<=" operators.
> > > > >
> > > > > How could we manage the implementation of "<=" and ">=" operators
> in
> > > MM?
> > > > >
> > > > > Regards,
> > > > >
> > > > > 2014-09-18 17:06 GMT+02:00 Kasper Sørensen <
> > > > i.am.kasper.sorensen@gmail.com
> > > > > >:
> > > > >
> > > > > > But how will you implement the BETWEEN logic for the JDBC module,
> > > when
> > > > it
> > > > > > is implemented ambigiuously in different databases. Rather I
> would
> > > > maybe
> > > > > > consider implementing only the ">=" and "<=" operators in MM.
> That
> > > way
> > > > we
> > > > > > stay clear from the ambiguity and anyways a user can simply make
> > his
> > > > > query
> > > > > > in MM using "<=" and ">=".
> > > > > >
> > > > > > 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <
> > > > > fjcano@stratio.com
> > > > > > >:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I agree with you. Perfect, it is OK for us.
> > > > > > >
> > > > > > > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> > > > > > >
> > > > > > > But in the other hand, what do you think about new "<=" and
> ">="
> > > > > > operators?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> > > > > > i.am.kasper.sorensen@gmail.com
> > > > > > > >:
> > > > > > >
> > > > > > > > I am still a bit unsure about the BETWEEN operator. Partly
> > > because
> > > > > I've
> > > > > > > > never used it in any database myself :-) But I was also
> > reading a
> > > > bit
> > > > > > > about
> > > > > > > > it [1] and found that it is implemented differently in
> > different
> > > > > > > databases
> > > > > > > > with regard to whether it includes or excludes the boundary
> > > values.
> > > > > For
> > > > > > > > this reason I would actually prefer using 2x "greater/less
> > than"
> > > > > filter
> > > > > > > > items instead of a single "between" filter item. Our queries
> > > should
> > > > > > have
> > > > > > > > the same meaning on all databases.
> > > > > > > >
> > > > > > > > Another little thing I found is that "NOT BETWEEN" is also an
> > > > option.
> > > > > > We
> > > > > > > > might choose not to implement that, but just wanted to bring
> it
> > > to
> > > > > the
> > > > > > > > table. Sorry if I'm now just making it more complex :-P
> > > > > > > >
> > > > > > > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > > > > > > fjcano@stratio.com>
> > > > > > > > :
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > > I performed some test and my first idea is:
> > > > > > > > >
> > > > > > > > > Manage operator field for BETWEEN operand as an array/list
> > with
> > > > > size
> > > > > > 2
> > > > > > > (~
> > > > > > > > > to IN).
> > > > > > > > >
> > > > > > > > > I have developed a skeleton and I'm fixing some tests.
> > > > > > > > >
> > > > > > > > > Do you have other ideas?
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > >
> > > > > > > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > > > > > > i.am.kasper.sorensen@gmail.com
> > > > > > > > > >:
> > > > > > > > >
> > > > > > > > > > Hi Francisco,
> > > > > > > > > >
> > > > > > > > > > These sound like cool additions in deed. I think you're
> > right
> > > > > wrt.
> > > > > > > > where
> > > > > > > > > > the impact would be.
> > > > > > > > > >
> > > > > > > > > > Would also need to check other modules that does smart
> > things
> > > > > with
> > > > > > > > query
> > > > > > > > > > optimizations, but that comes second.
> > > > > > > > > >
> > > > > > > > > > Not sure how to fix the BETWEEN case since FilterItem
> only
> > > > takes
> > > > > > one
> > > > > > > > > > operand. Any ideas?
> > > > > > > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano
> Bailen" <
> > > > > > > > > > fjcano@stratio.com>:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > >
> > > > > > > > > > > Thanks Kasper for your first support.
> > > > > > > > > > >
> > > > > > > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > > > > > > >
> > > > > > > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > > > > > > GREATER_THAN(">"),
> > > > > > > > > > > LESS_THAN("<"), IN("IN"),
> > > > > > > > > > >
> > > > > > > > > > > If it is possible, I would like to implement "<=",
> ">=""
> > > and
> > > > > > > > "BETWEEN"
> > > > > > > > > > > operator types.
> > > > > > > > > > >
> > > > > > > > > > > From my first review and test, I'm going to write new
> > code
> > > > in:
> > > > > > > > > > >
> > > > > > > > > > > FilterItem.java
> > > > > > > > > > > - toSql method
> > > > > > > > > > > - comparator method
> > > > > > > > > > > OperatorType.java
> > > > > > > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > > > > > > Query.java
> > > > > > > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage
> Y
> > > > > operand
> > > > > > > > > without
> > > > > > > > > > > operator
> > > > > > > > > > >
> > > > > > > > > > > From your point of view, Do you have other ideas in
> mind?
> > > > > > > > > > >
> > > > > > > > > > > Regards,
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > >
> > > > > > > > > > > Francisco Javier Cano
> > > > > > > > > > > Senior Developer
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > <http://www.stratio.com/>
> > > > > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > > > > https://twitter.com/StratioBD
> > > > > > > > >*
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > > Francisco Javier Cano
> > > > > > > > > Senior Developer
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > <http://www.stratio.com/>
> > > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > > https://twitter.com/StratioBD
> > > > > > >*
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Francisco Javier Cano
> > > > > > > Senior Developer
> > > > > > >
> > > > > > >
> > > > > > > <http://www.stratio.com/>
> > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > https://twitter.com/StratioBD
> > > > >*
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Francisco Javier Cano
> > > > > Senior Developer
> > > > >
> > > > >
> > > > > <http://www.stratio.com/>
> > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> https://twitter.com/StratioBD
> > >*
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Francisco Javier Cano
> > > Senior Developer
> > >
> > >
> > > <http://www.stratio.com/>
> > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > 28224 Pozuelo de Alarcón, Madrid
> > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> > >
> >
>
>
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Francisco Javier Cano Bailen <fj...@stratio.com>.
Hello Kasper,

Thanks for the provided information.

I forked metamodel and I'm including the changes for
https://issues.apache.org/jira/browse/METAMODEL-83 . I will perform a pull
request when I commit the changes.

-----

I reviewed the modules and this is the log change:

* CouchDB. No changes.Added new assertions for ">=" "<="
* CSV: No changes.
* ElasticSearch: No changes.
* Excel: No changes.
* FixedWith: No changes.
* HBase: No changes.
* JDBC: Added new assertions ">=" "<="
DB2: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
HSQLDB: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
MySQL: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
PostgreSQL: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
SQLServer: SQL Syntax <= and >= (rewriteFilterItem does not need to change)
* JSON: No changes.
* MongoDB:
Included $gte / $lte operators.
* OpenOffice: HSQLDB: No changes.
* pojo: No changes.
* salesforce: No changes.
* Spring: Delegate to context creation
* sugarCrm: No changes.
* XML: No changes.

-----

Following the modules review I would like to confirm how metamodel works
regarding MEMORY VS DELEGATION processing (eg: group by):

* CouchDB. Memory.
* CSV: Memory.
* ElasticSearch: Memory
* Excel: Memory.
* FixedWith: Memory.
* HBase: Memory.
* JDBC: Delegate to the driver.
* JSON: Memory.
* MongoDB: Partial delegate to the driver (PostProcessing).
* OpenOffice: Delegate to the driver.
* pojo: Memory.
* salesforce: Delegate to the driver.
* Spring: Delegate to context creation.
* sugarCrm: Memory.
* XML: Memory.

Do you want me to open a new topic in metamodel-dev mailing list to manage
the question?

Regards,

2014-09-29 15:45 GMT+02:00 Kasper Sørensen <i....@gmail.com>:

> Hi Francisco,
>
> Good that you ask how to do this, and excuse us if we haven't been good
> enough in communicating it (should get this info into our CONTRIBUTE.md
> file).
>
> As a contributor it is best if you can do two things:
>
> 1) Make a JIRA about your contribution, that is really a great way to
> consolidate the communication on a issue
> 2) Share your patch in one form or the other. We currently have a few ways:
> You can either post it as a diff on our review board [1] or you can make a
> pull request towards our GitHub mirror [2].
>
> Best regards,
> Kasper
>
> [1] https://reviews.apache.org/groups/metamodel/
> [2] https://github.com/apache/incubator-metamodel/tree/master
>
>
> 2014-09-29 14:22 GMT+02:00 Francisco Javier Cano Bailen <
> fjcano@stratio.com>
> :
>
> > Hello Kasper,
> >
> > To apply the change:
> >
> > 1. I modified the core (Operator and Filter classes (new methods
> > greaterThanOrEquals/lessThanOrEquals in FilterBuilder))
> > 2. MongoDbDataContext
> >
> > Now I'm working about CouchDB and reviewing other modules (dialects).
> >
> > Do you want me to open a Jira request? How are you managing this kind of
> > changes? Do we need a new fork from master / new git branch from master?
> >
> > Regards,
> >
> >
> > 2014-09-19 13:01 GMT+02:00 Kasper Sørensen <
> i.am.kasper.sorensen@gmail.com
> > >:
> >
> > > Hi Francisco,
> > >
> > > I imagine those are much easier to handle. Previously you posted a
> > "recipe"
> > > which I think applies very well. Then a small review of MongoDB,
> CouchDB
> > > and maybe a few other modules might be needed. But all in all I think
> it
> > > sounds pretty easy.
> > >
> > > Testing-wise, it should be tested for the JdbcModule and some quick
> > > research on SQL dialects might be needed - but I think all dialects use
> > the
> > > same notation (">=" and "<="... I hope not "=>" and "=<"). Give it a
> try
> > > and we will give you some feedback! :-)
> > >
> > > Kasper
> > >
> > > 2014-09-18 17:25 GMT+02:00 Francisco Javier Cano Bailen <
> > > fjcano@stratio.com>
> > > :
> > >
> > > > Hello,
> > > >
> > > > Sorry, I wrote an unclear comment. I meant, BETWEEN will not
> implement
> > > > because you are right we have an ambiguous behavior among different
> DB.
> > > But
> > > > It will be useful if we include ">=" and "<=" operators.
> > > >
> > > > How could we manage the implementation of "<=" and ">=" operators in
> > MM?
> > > >
> > > > Regards,
> > > >
> > > > 2014-09-18 17:06 GMT+02:00 Kasper Sørensen <
> > > i.am.kasper.sorensen@gmail.com
> > > > >:
> > > >
> > > > > But how will you implement the BETWEEN logic for the JDBC module,
> > when
> > > it
> > > > > is implemented ambigiuously in different databases. Rather I would
> > > maybe
> > > > > consider implementing only the ">=" and "<=" operators in MM. That
> > way
> > > we
> > > > > stay clear from the ambiguity and anyways a user can simply make
> his
> > > > query
> > > > > in MM using "<=" and ">=".
> > > > >
> > > > > 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <
> > > > fjcano@stratio.com
> > > > > >:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I agree with you. Perfect, it is OK for us.
> > > > > >
> > > > > > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> > > > > >
> > > > > > But in the other hand, what do you think about new "<=" and ">="
> > > > > operators?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> > > > > i.am.kasper.sorensen@gmail.com
> > > > > > >:
> > > > > >
> > > > > > > I am still a bit unsure about the BETWEEN operator. Partly
> > because
> > > > I've
> > > > > > > never used it in any database myself :-) But I was also
> reading a
> > > bit
> > > > > > about
> > > > > > > it [1] and found that it is implemented differently in
> different
> > > > > > databases
> > > > > > > with regard to whether it includes or excludes the boundary
> > values.
> > > > For
> > > > > > > this reason I would actually prefer using 2x "greater/less
> than"
> > > > filter
> > > > > > > items instead of a single "between" filter item. Our queries
> > should
> > > > > have
> > > > > > > the same meaning on all databases.
> > > > > > >
> > > > > > > Another little thing I found is that "NOT BETWEEN" is also an
> > > option.
> > > > > We
> > > > > > > might choose not to implement that, but just wanted to bring it
> > to
> > > > the
> > > > > > > table. Sorry if I'm now just making it more complex :-P
> > > > > > >
> > > > > > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > > > > > fjcano@stratio.com>
> > > > > > > :
> > > > > > >
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I performed some test and my first idea is:
> > > > > > > >
> > > > > > > > Manage operator field for BETWEEN operand as an array/list
> with
> > > > size
> > > > > 2
> > > > > > (~
> > > > > > > > to IN).
> > > > > > > >
> > > > > > > > I have developed a skeleton and I'm fixing some tests.
> > > > > > > >
> > > > > > > > Do you have other ideas?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > > > > > i.am.kasper.sorensen@gmail.com
> > > > > > > > >:
> > > > > > > >
> > > > > > > > > Hi Francisco,
> > > > > > > > >
> > > > > > > > > These sound like cool additions in deed. I think you're
> right
> > > > wrt.
> > > > > > > where
> > > > > > > > > the impact would be.
> > > > > > > > >
> > > > > > > > > Would also need to check other modules that does smart
> things
> > > > with
> > > > > > > query
> > > > > > > > > optimizations, but that comes second.
> > > > > > > > >
> > > > > > > > > Not sure how to fix the BETWEEN case since FilterItem only
> > > takes
> > > > > one
> > > > > > > > > operand. Any ideas?
> > > > > > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > > > > > > fjcano@stratio.com>:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > >
> > > > > > > > > > Thanks Kasper for your first support.
> > > > > > > > > >
> > > > > > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > > > > > >
> > > > > > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > > > > > GREATER_THAN(">"),
> > > > > > > > > > LESS_THAN("<"), IN("IN"),
> > > > > > > > > >
> > > > > > > > > > If it is possible, I would like to implement "<=", ">=""
> > and
> > > > > > > "BETWEEN"
> > > > > > > > > > operator types.
> > > > > > > > > >
> > > > > > > > > > From my first review and test, I'm going to write new
> code
> > > in:
> > > > > > > > > >
> > > > > > > > > > FilterItem.java
> > > > > > > > > > - toSql method
> > > > > > > > > > - comparator method
> > > > > > > > > > OperatorType.java
> > > > > > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > > > > > Query.java
> > > > > > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y
> > > > operand
> > > > > > > > without
> > > > > > > > > > operator
> > > > > > > > > >
> > > > > > > > > > From your point of view, Do you have other ideas in mind?
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > >
> > > > > > > > > > Francisco Javier Cano
> > > > > > > > > > Senior Developer
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > <http://www.stratio.com/>
> > > > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > > > https://twitter.com/StratioBD
> > > > > > > >*
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > >
> > > > > > > > Francisco Javier Cano
> > > > > > > > Senior Developer
> > > > > > > >
> > > > > > > >
> > > > > > > > <http://www.stratio.com/>
> > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > https://twitter.com/StratioBD
> > > > > >*
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Francisco Javier Cano
> > > > > > Senior Developer
> > > > > >
> > > > > >
> > > > > > <http://www.stratio.com/>
> > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > https://twitter.com/StratioBD
> > > >*
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Francisco Javier Cano
> > > > Senior Developer
> > > >
> > > >
> > > > <http://www.stratio.com/>
> > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > 28224 Pozuelo de Alarcón, Madrid
> > > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD
> >*
> > > >
> > >
> >
> >
> >
> > --
> >
> > Francisco Javier Cano
> > Senior Developer
> >
> >
> > <http://www.stratio.com/>
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón, Madrid
> > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> >
>



-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
Hi Francisco,

Good that you ask how to do this, and excuse us if we haven't been good
enough in communicating it (should get this info into our CONTRIBUTE.md
file).

As a contributor it is best if you can do two things:

1) Make a JIRA about your contribution, that is really a great way to
consolidate the communication on a issue
2) Share your patch in one form or the other. We currently have a few ways:
You can either post it as a diff on our review board [1] or you can make a
pull request towards our GitHub mirror [2].

Best regards,
Kasper

[1] https://reviews.apache.org/groups/metamodel/
[2] https://github.com/apache/incubator-metamodel/tree/master


2014-09-29 14:22 GMT+02:00 Francisco Javier Cano Bailen <fj...@stratio.com>
:

> Hello Kasper,
>
> To apply the change:
>
> 1. I modified the core (Operator and Filter classes (new methods
> greaterThanOrEquals/lessThanOrEquals in FilterBuilder))
> 2. MongoDbDataContext
>
> Now I'm working about CouchDB and reviewing other modules (dialects).
>
> Do you want me to open a Jira request? How are you managing this kind of
> changes? Do we need a new fork from master / new git branch from master?
>
> Regards,
>
>
> 2014-09-19 13:01 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> > Hi Francisco,
> >
> > I imagine those are much easier to handle. Previously you posted a
> "recipe"
> > which I think applies very well. Then a small review of MongoDB, CouchDB
> > and maybe a few other modules might be needed. But all in all I think it
> > sounds pretty easy.
> >
> > Testing-wise, it should be tested for the JdbcModule and some quick
> > research on SQL dialects might be needed - but I think all dialects use
> the
> > same notation (">=" and "<="... I hope not "=>" and "=<"). Give it a try
> > and we will give you some feedback! :-)
> >
> > Kasper
> >
> > 2014-09-18 17:25 GMT+02:00 Francisco Javier Cano Bailen <
> > fjcano@stratio.com>
> > :
> >
> > > Hello,
> > >
> > > Sorry, I wrote an unclear comment. I meant, BETWEEN will not implement
> > > because you are right we have an ambiguous behavior among different DB.
> > But
> > > It will be useful if we include ">=" and "<=" operators.
> > >
> > > How could we manage the implementation of "<=" and ">=" operators in
> MM?
> > >
> > > Regards,
> > >
> > > 2014-09-18 17:06 GMT+02:00 Kasper Sørensen <
> > i.am.kasper.sorensen@gmail.com
> > > >:
> > >
> > > > But how will you implement the BETWEEN logic for the JDBC module,
> when
> > it
> > > > is implemented ambigiuously in different databases. Rather I would
> > maybe
> > > > consider implementing only the ">=" and "<=" operators in MM. That
> way
> > we
> > > > stay clear from the ambiguity and anyways a user can simply make his
> > > query
> > > > in MM using "<=" and ">=".
> > > >
> > > > 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <
> > > fjcano@stratio.com
> > > > >:
> > > >
> > > > > Hello,
> > > > >
> > > > > I agree with you. Perfect, it is OK for us.
> > > > >
> > > > > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> > > > >
> > > > > But in the other hand, what do you think about new "<=" and ">="
> > > > operators?
> > > > >
> > > > > Regards,
> > > > >
> > > > > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> > > > i.am.kasper.sorensen@gmail.com
> > > > > >:
> > > > >
> > > > > > I am still a bit unsure about the BETWEEN operator. Partly
> because
> > > I've
> > > > > > never used it in any database myself :-) But I was also reading a
> > bit
> > > > > about
> > > > > > it [1] and found that it is implemented differently in different
> > > > > databases
> > > > > > with regard to whether it includes or excludes the boundary
> values.
> > > For
> > > > > > this reason I would actually prefer using 2x "greater/less than"
> > > filter
> > > > > > items instead of a single "between" filter item. Our queries
> should
> > > > have
> > > > > > the same meaning on all databases.
> > > > > >
> > > > > > Another little thing I found is that "NOT BETWEEN" is also an
> > option.
> > > > We
> > > > > > might choose not to implement that, but just wanted to bring it
> to
> > > the
> > > > > > table. Sorry if I'm now just making it more complex :-P
> > > > > >
> > > > > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > > > > fjcano@stratio.com>
> > > > > > :
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I performed some test and my first idea is:
> > > > > > >
> > > > > > > Manage operator field for BETWEEN operand as an array/list with
> > > size
> > > > 2
> > > > > (~
> > > > > > > to IN).
> > > > > > >
> > > > > > > I have developed a skeleton and I'm fixing some tests.
> > > > > > >
> > > > > > > Do you have other ideas?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > > > > i.am.kasper.sorensen@gmail.com
> > > > > > > >:
> > > > > > >
> > > > > > > > Hi Francisco,
> > > > > > > >
> > > > > > > > These sound like cool additions in deed. I think you're right
> > > wrt.
> > > > > > where
> > > > > > > > the impact would be.
> > > > > > > >
> > > > > > > > Would also need to check other modules that does smart things
> > > with
> > > > > > query
> > > > > > > > optimizations, but that comes second.
> > > > > > > >
> > > > > > > > Not sure how to fix the BETWEEN case since FilterItem only
> > takes
> > > > one
> > > > > > > > operand. Any ideas?
> > > > > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > > > > > fjcano@stratio.com>:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > > Thanks Kasper for your first support.
> > > > > > > > >
> > > > > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > > > > >
> > > > > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > > > > GREATER_THAN(">"),
> > > > > > > > > LESS_THAN("<"), IN("IN"),
> > > > > > > > >
> > > > > > > > > If it is possible, I would like to implement "<=", ">=""
> and
> > > > > > "BETWEEN"
> > > > > > > > > operator types.
> > > > > > > > >
> > > > > > > > > From my first review and test, I'm going to write new code
> > in:
> > > > > > > > >
> > > > > > > > > FilterItem.java
> > > > > > > > > - toSql method
> > > > > > > > > - comparator method
> > > > > > > > > OperatorType.java
> > > > > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > > > > Query.java
> > > > > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y
> > > operand
> > > > > > > without
> > > > > > > > > operator
> > > > > > > > >
> > > > > > > > > From your point of view, Do you have other ideas in mind?
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > > Francisco Javier Cano
> > > > > > > > > Senior Developer
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > <http://www.stratio.com/>
> > > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > > https://twitter.com/StratioBD
> > > > > > >*
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Francisco Javier Cano
> > > > > > > Senior Developer
> > > > > > >
> > > > > > >
> > > > > > > <http://www.stratio.com/>
> > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > https://twitter.com/StratioBD
> > > > >*
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Francisco Javier Cano
> > > > > Senior Developer
> > > > >
> > > > >
> > > > > <http://www.stratio.com/>
> > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> https://twitter.com/StratioBD
> > >*
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Francisco Javier Cano
> > > Senior Developer
> > >
> > >
> > > <http://www.stratio.com/>
> > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > 28224 Pozuelo de Alarcón, Madrid
> > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> > >
> >
>
>
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Francisco Javier Cano Bailen <fj...@stratio.com>.
Hello Kasper,

To apply the change:

1. I modified the core (Operator and Filter classes (new methods
greaterThanOrEquals/lessThanOrEquals in FilterBuilder))
2. MongoDbDataContext

Now I'm working about CouchDB and reviewing other modules (dialects).

Do you want me to open a Jira request? How are you managing this kind of
changes? Do we need a new fork from master / new git branch from master?

Regards,


2014-09-19 13:01 GMT+02:00 Kasper Sørensen <i....@gmail.com>:

> Hi Francisco,
>
> I imagine those are much easier to handle. Previously you posted a "recipe"
> which I think applies very well. Then a small review of MongoDB, CouchDB
> and maybe a few other modules might be needed. But all in all I think it
> sounds pretty easy.
>
> Testing-wise, it should be tested for the JdbcModule and some quick
> research on SQL dialects might be needed - but I think all dialects use the
> same notation (">=" and "<="... I hope not "=>" and "=<"). Give it a try
> and we will give you some feedback! :-)
>
> Kasper
>
> 2014-09-18 17:25 GMT+02:00 Francisco Javier Cano Bailen <
> fjcano@stratio.com>
> :
>
> > Hello,
> >
> > Sorry, I wrote an unclear comment. I meant, BETWEEN will not implement
> > because you are right we have an ambiguous behavior among different DB.
> But
> > It will be useful if we include ">=" and "<=" operators.
> >
> > How could we manage the implementation of "<=" and ">=" operators in MM?
> >
> > Regards,
> >
> > 2014-09-18 17:06 GMT+02:00 Kasper Sørensen <
> i.am.kasper.sorensen@gmail.com
> > >:
> >
> > > But how will you implement the BETWEEN logic for the JDBC module, when
> it
> > > is implemented ambigiuously in different databases. Rather I would
> maybe
> > > consider implementing only the ">=" and "<=" operators in MM. That way
> we
> > > stay clear from the ambiguity and anyways a user can simply make his
> > query
> > > in MM using "<=" and ">=".
> > >
> > > 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <
> > fjcano@stratio.com
> > > >:
> > >
> > > > Hello,
> > > >
> > > > I agree with you. Perfect, it is OK for us.
> > > >
> > > > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> > > >
> > > > But in the other hand, what do you think about new "<=" and ">="
> > > operators?
> > > >
> > > > Regards,
> > > >
> > > > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> > > i.am.kasper.sorensen@gmail.com
> > > > >:
> > > >
> > > > > I am still a bit unsure about the BETWEEN operator. Partly because
> > I've
> > > > > never used it in any database myself :-) But I was also reading a
> bit
> > > > about
> > > > > it [1] and found that it is implemented differently in different
> > > > databases
> > > > > with regard to whether it includes or excludes the boundary values.
> > For
> > > > > this reason I would actually prefer using 2x "greater/less than"
> > filter
> > > > > items instead of a single "between" filter item. Our queries should
> > > have
> > > > > the same meaning on all databases.
> > > > >
> > > > > Another little thing I found is that "NOT BETWEEN" is also an
> option.
> > > We
> > > > > might choose not to implement that, but just wanted to bring it to
> > the
> > > > > table. Sorry if I'm now just making it more complex :-P
> > > > >
> > > > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > > > fjcano@stratio.com>
> > > > > :
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I performed some test and my first idea is:
> > > > > >
> > > > > > Manage operator field for BETWEEN operand as an array/list with
> > size
> > > 2
> > > > (~
> > > > > > to IN).
> > > > > >
> > > > > > I have developed a skeleton and I'm fixing some tests.
> > > > > >
> > > > > > Do you have other ideas?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > > > i.am.kasper.sorensen@gmail.com
> > > > > > >:
> > > > > >
> > > > > > > Hi Francisco,
> > > > > > >
> > > > > > > These sound like cool additions in deed. I think you're right
> > wrt.
> > > > > where
> > > > > > > the impact would be.
> > > > > > >
> > > > > > > Would also need to check other modules that does smart things
> > with
> > > > > query
> > > > > > > optimizations, but that comes second.
> > > > > > >
> > > > > > > Not sure how to fix the BETWEEN case since FilterItem only
> takes
> > > one
> > > > > > > operand. Any ideas?
> > > > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > > > > fjcano@stratio.com>:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > Thanks Kasper for your first support.
> > > > > > > >
> > > > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > > > >
> > > > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > > > GREATER_THAN(">"),
> > > > > > > > LESS_THAN("<"), IN("IN"),
> > > > > > > >
> > > > > > > > If it is possible, I would like to implement "<=", ">="" and
> > > > > "BETWEEN"
> > > > > > > > operator types.
> > > > > > > >
> > > > > > > > From my first review and test, I'm going to write new code
> in:
> > > > > > > >
> > > > > > > > FilterItem.java
> > > > > > > > - toSql method
> > > > > > > > - comparator method
> > > > > > > > OperatorType.java
> > > > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > > > Query.java
> > > > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y
> > operand
> > > > > > without
> > > > > > > > operator
> > > > > > > >
> > > > > > > > From your point of view, Do you have other ideas in mind?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > --
> > > > > > > >
> > > > > > > > Francisco Javier Cano
> > > > > > > > Senior Developer
> > > > > > > >
> > > > > > > >
> > > > > > > > <http://www.stratio.com/>
> > > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > > https://twitter.com/StratioBD
> > > > > >*
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Francisco Javier Cano
> > > > > > Senior Developer
> > > > > >
> > > > > >
> > > > > > <http://www.stratio.com/>
> > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > https://twitter.com/StratioBD
> > > >*
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Francisco Javier Cano
> > > > Senior Developer
> > > >
> > > >
> > > > <http://www.stratio.com/>
> > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > 28224 Pozuelo de Alarcón, Madrid
> > > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD
> >*
> > > >
> > >
> >
> >
> >
> > --
> >
> > Francisco Javier Cano
> > Senior Developer
> >
> >
> > <http://www.stratio.com/>
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón, Madrid
> > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> >
>



-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
Hi Francisco,

I imagine those are much easier to handle. Previously you posted a "recipe"
which I think applies very well. Then a small review of MongoDB, CouchDB
and maybe a few other modules might be needed. But all in all I think it
sounds pretty easy.

Testing-wise, it should be tested for the JdbcModule and some quick
research on SQL dialects might be needed - but I think all dialects use the
same notation (">=" and "<="... I hope not "=>" and "=<"). Give it a try
and we will give you some feedback! :-)

Kasper

2014-09-18 17:25 GMT+02:00 Francisco Javier Cano Bailen <fj...@stratio.com>
:

> Hello,
>
> Sorry, I wrote an unclear comment. I meant, BETWEEN will not implement
> because you are right we have an ambiguous behavior among different DB. But
> It will be useful if we include ">=" and "<=" operators.
>
> How could we manage the implementation of "<=" and ">=" operators in MM?
>
> Regards,
>
> 2014-09-18 17:06 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> > But how will you implement the BETWEEN logic for the JDBC module, when it
> > is implemented ambigiuously in different databases. Rather I would maybe
> > consider implementing only the ">=" and "<=" operators in MM. That way we
> > stay clear from the ambiguity and anyways a user can simply make his
> query
> > in MM using "<=" and ">=".
> >
> > 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <
> fjcano@stratio.com
> > >:
> >
> > > Hello,
> > >
> > > I agree with you. Perfect, it is OK for us.
> > >
> > > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> > >
> > > But in the other hand, what do you think about new "<=" and ">="
> > operators?
> > >
> > > Regards,
> > >
> > > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> > i.am.kasper.sorensen@gmail.com
> > > >:
> > >
> > > > I am still a bit unsure about the BETWEEN operator. Partly because
> I've
> > > > never used it in any database myself :-) But I was also reading a bit
> > > about
> > > > it [1] and found that it is implemented differently in different
> > > databases
> > > > with regard to whether it includes or excludes the boundary values.
> For
> > > > this reason I would actually prefer using 2x "greater/less than"
> filter
> > > > items instead of a single "between" filter item. Our queries should
> > have
> > > > the same meaning on all databases.
> > > >
> > > > Another little thing I found is that "NOT BETWEEN" is also an option.
> > We
> > > > might choose not to implement that, but just wanted to bring it to
> the
> > > > table. Sorry if I'm now just making it more complex :-P
> > > >
> > > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > > fjcano@stratio.com>
> > > > :
> > > >
> > > > > Hello,
> > > > >
> > > > > I performed some test and my first idea is:
> > > > >
> > > > > Manage operator field for BETWEEN operand as an array/list with
> size
> > 2
> > > (~
> > > > > to IN).
> > > > >
> > > > > I have developed a skeleton and I'm fixing some tests.
> > > > >
> > > > > Do you have other ideas?
> > > > >
> > > > > Regards,
> > > > >
> > > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > > i.am.kasper.sorensen@gmail.com
> > > > > >:
> > > > >
> > > > > > Hi Francisco,
> > > > > >
> > > > > > These sound like cool additions in deed. I think you're right
> wrt.
> > > > where
> > > > > > the impact would be.
> > > > > >
> > > > > > Would also need to check other modules that does smart things
> with
> > > > query
> > > > > > optimizations, but that comes second.
> > > > > >
> > > > > > Not sure how to fix the BETWEEN case since FilterItem only takes
> > one
> > > > > > operand. Any ideas?
> > > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > > > fjcano@stratio.com>:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > Thanks Kasper for your first support.
> > > > > > >
> > > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > > >
> > > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > > GREATER_THAN(">"),
> > > > > > > LESS_THAN("<"), IN("IN"),
> > > > > > >
> > > > > > > If it is possible, I would like to implement "<=", ">="" and
> > > > "BETWEEN"
> > > > > > > operator types.
> > > > > > >
> > > > > > > From my first review and test, I'm going to write new code in:
> > > > > > >
> > > > > > > FilterItem.java
> > > > > > > - toSql method
> > > > > > > - comparator method
> > > > > > > OperatorType.java
> > > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > > Query.java
> > > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y
> operand
> > > > > without
> > > > > > > operator
> > > > > > >
> > > > > > > From your point of view, Do you have other ideas in mind?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Francisco Javier Cano
> > > > > > > Senior Developer
> > > > > > >
> > > > > > >
> > > > > > > <http://www.stratio.com/>
> > > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > > https://twitter.com/StratioBD
> > > > >*
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Francisco Javier Cano
> > > > > Senior Developer
> > > > >
> > > > >
> > > > > <http://www.stratio.com/>
> > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> https://twitter.com/StratioBD
> > >*
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Francisco Javier Cano
> > > Senior Developer
> > >
> > >
> > > <http://www.stratio.com/>
> > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > 28224 Pozuelo de Alarcón, Madrid
> > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> > >
> >
>
>
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Francisco Javier Cano Bailen <fj...@stratio.com>.
Hello,

Sorry, I wrote an unclear comment. I meant, BETWEEN will not implement
because you are right we have an ambiguous behavior among different DB. But
It will be useful if we include ">=" and "<=" operators.

How could we manage the implementation of "<=" and ">=" operators in MM?

Regards,

2014-09-18 17:06 GMT+02:00 Kasper Sørensen <i....@gmail.com>:

> But how will you implement the BETWEEN logic for the JDBC module, when it
> is implemented ambigiuously in different databases. Rather I would maybe
> consider implementing only the ">=" and "<=" operators in MM. That way we
> stay clear from the ambiguity and anyways a user can simply make his query
> in MM using "<=" and ">=".
>
> 2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <fjcano@stratio.com
> >:
>
> > Hello,
> >
> > I agree with you. Perfect, it is OK for us.
> >
> > We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
> >
> > But in the other hand, what do you think about new "<=" and ">="
> operators?
> >
> > Regards,
> >
> > 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <
> i.am.kasper.sorensen@gmail.com
> > >:
> >
> > > I am still a bit unsure about the BETWEEN operator. Partly because I've
> > > never used it in any database myself :-) But I was also reading a bit
> > about
> > > it [1] and found that it is implemented differently in different
> > databases
> > > with regard to whether it includes or excludes the boundary values. For
> > > this reason I would actually prefer using 2x "greater/less than" filter
> > > items instead of a single "between" filter item. Our queries should
> have
> > > the same meaning on all databases.
> > >
> > > Another little thing I found is that "NOT BETWEEN" is also an option.
> We
> > > might choose not to implement that, but just wanted to bring it to the
> > > table. Sorry if I'm now just making it more complex :-P
> > >
> > > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > > fjcano@stratio.com>
> > > :
> > >
> > > > Hello,
> > > >
> > > > I performed some test and my first idea is:
> > > >
> > > > Manage operator field for BETWEEN operand as an array/list with size
> 2
> > (~
> > > > to IN).
> > > >
> > > > I have developed a skeleton and I'm fixing some tests.
> > > >
> > > > Do you have other ideas?
> > > >
> > > > Regards,
> > > >
> > > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > > i.am.kasper.sorensen@gmail.com
> > > > >:
> > > >
> > > > > Hi Francisco,
> > > > >
> > > > > These sound like cool additions in deed. I think you're right wrt.
> > > where
> > > > > the impact would be.
> > > > >
> > > > > Would also need to check other modules that does smart things with
> > > query
> > > > > optimizations, but that comes second.
> > > > >
> > > > > Not sure how to fix the BETWEEN case since FilterItem only takes
> one
> > > > > operand. Any ideas?
> > > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > > fjcano@stratio.com>:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > Thanks Kasper for your first support.
> > > > > >
> > > > > > Regarding the OperatorType, MetaModel provides:
> > > > > >
> > > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > > GREATER_THAN(">"),
> > > > > > LESS_THAN("<"), IN("IN"),
> > > > > >
> > > > > > If it is possible, I would like to implement "<=", ">="" and
> > > "BETWEEN"
> > > > > > operator types.
> > > > > >
> > > > > > From my first review and test, I'm going to write new code in:
> > > > > >
> > > > > > FilterItem.java
> > > > > > - toSql method
> > > > > > - comparator method
> > > > > > OperatorType.java
> > > > > > - new OperatorType <= , >= and BETWEEN
> > > > > > Query.java
> > > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand
> > > > without
> > > > > > operator
> > > > > >
> > > > > > From your point of view, Do you have other ideas in mind?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Francisco Javier Cano
> > > > > > Senior Developer
> > > > > >
> > > > > >
> > > > > > <http://www.stratio.com/>
> > > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> > https://twitter.com/StratioBD
> > > >*
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Francisco Javier Cano
> > > > Senior Developer
> > > >
> > > >
> > > > <http://www.stratio.com/>
> > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > 28224 Pozuelo de Alarcón, Madrid
> > > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD
> >*
> > > >
> > >
> >
> >
> >
> > --
> >
> > Francisco Javier Cano
> > Senior Developer
> >
> >
> > <http://www.stratio.com/>
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón, Madrid
> > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> >
>



-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
But how will you implement the BETWEEN logic for the JDBC module, when it
is implemented ambigiuously in different databases. Rather I would maybe
consider implementing only the ">=" and "<=" operators in MM. That way we
stay clear from the ambiguity and anyways a user can simply make his query
in MM using "<=" and ">=".

2014-09-18 9:34 GMT+02:00 Francisco Javier Cano Bailen <fj...@stratio.com>:

> Hello,
>
> I agree with you. Perfect, it is OK for us.
>
> We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".
>
> But in the other hand, what do you think about new "<=" and ">=" operators?
>
> Regards,
>
> 2014-09-17 21:18 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> > I am still a bit unsure about the BETWEEN operator. Partly because I've
> > never used it in any database myself :-) But I was also reading a bit
> about
> > it [1] and found that it is implemented differently in different
> databases
> > with regard to whether it includes or excludes the boundary values. For
> > this reason I would actually prefer using 2x "greater/less than" filter
> > items instead of a single "between" filter item. Our queries should have
> > the same meaning on all databases.
> >
> > Another little thing I found is that "NOT BETWEEN" is also an option. We
> > might choose not to implement that, but just wanted to bring it to the
> > table. Sorry if I'm now just making it more complex :-P
> >
> > 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> > fjcano@stratio.com>
> > :
> >
> > > Hello,
> > >
> > > I performed some test and my first idea is:
> > >
> > > Manage operator field for BETWEEN operand as an array/list with size 2
> (~
> > > to IN).
> > >
> > > I have developed a skeleton and I'm fixing some tests.
> > >
> > > Do you have other ideas?
> > >
> > > Regards,
> > >
> > > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> > i.am.kasper.sorensen@gmail.com
> > > >:
> > >
> > > > Hi Francisco,
> > > >
> > > > These sound like cool additions in deed. I think you're right wrt.
> > where
> > > > the impact would be.
> > > >
> > > > Would also need to check other modules that does smart things with
> > query
> > > > optimizations, but that comes second.
> > > >
> > > > Not sure how to fix the BETWEEN case since FilterItem only takes one
> > > > operand. Any ideas?
> > > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > > fjcano@stratio.com>:
> > > >
> > > > > Hello,
> > > > >
> > > > > Thanks Kasper for your first support.
> > > > >
> > > > > Regarding the OperatorType, MetaModel provides:
> > > > >
> > > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> > GREATER_THAN(">"),
> > > > > LESS_THAN("<"), IN("IN"),
> > > > >
> > > > > If it is possible, I would like to implement "<=", ">="" and
> > "BETWEEN"
> > > > > operator types.
> > > > >
> > > > > From my first review and test, I'm going to write new code in:
> > > > >
> > > > > FilterItem.java
> > > > > - toSql method
> > > > > - comparator method
> > > > > OperatorType.java
> > > > > - new OperatorType <= , >= and BETWEEN
> > > > > Query.java
> > > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand
> > > without
> > > > > operator
> > > > >
> > > > > From your point of view, Do you have other ideas in mind?
> > > > >
> > > > > Regards,
> > > > >
> > > > > --
> > > > >
> > > > > Francisco Javier Cano
> > > > > Senior Developer
> > > > >
> > > > >
> > > > > <http://www.stratio.com/>
> > > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > > 28224 Pozuelo de Alarcón, Madrid
> > > > > Tel: +34 91 352 59 42 // *@stratiobd <
> https://twitter.com/StratioBD
> > >*
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Francisco Javier Cano
> > > Senior Developer
> > >
> > >
> > > <http://www.stratio.com/>
> > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > 28224 Pozuelo de Alarcón, Madrid
> > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> > >
> >
>
>
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Francisco Javier Cano Bailen <fj...@stratio.com>.
Hello,

I agree with you. Perfect, it is OK for us.

We will work in the way "BETWEEN" like "X >= V0 AND X <= V1".

But in the other hand, what do you think about new "<=" and ">=" operators?

Regards,

2014-09-17 21:18 GMT+02:00 Kasper Sørensen <i....@gmail.com>:

> I am still a bit unsure about the BETWEEN operator. Partly because I've
> never used it in any database myself :-) But I was also reading a bit about
> it [1] and found that it is implemented differently in different databases
> with regard to whether it includes or excludes the boundary values. For
> this reason I would actually prefer using 2x "greater/less than" filter
> items instead of a single "between" filter item. Our queries should have
> the same meaning on all databases.
>
> Another little thing I found is that "NOT BETWEEN" is also an option. We
> might choose not to implement that, but just wanted to bring it to the
> table. Sorry if I'm now just making it more complex :-P
>
> 2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <
> fjcano@stratio.com>
> :
>
> > Hello,
> >
> > I performed some test and my first idea is:
> >
> > Manage operator field for BETWEEN operand as an array/list with size 2 (~
> > to IN).
> >
> > I have developed a skeleton and I'm fixing some tests.
> >
> > Do you have other ideas?
> >
> > Regards,
> >
> > 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <
> i.am.kasper.sorensen@gmail.com
> > >:
> >
> > > Hi Francisco,
> > >
> > > These sound like cool additions in deed. I think you're right wrt.
> where
> > > the impact would be.
> > >
> > > Would also need to check other modules that does smart things with
> query
> > > optimizations, but that comes second.
> > >
> > > Not sure how to fix the BETWEEN case since FilterItem only takes one
> > > operand. Any ideas?
> > > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > > fjcano@stratio.com>:
> > >
> > > > Hello,
> > > >
> > > > Thanks Kasper for your first support.
> > > >
> > > > Regarding the OperatorType, MetaModel provides:
> > > >
> > > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"),
> GREATER_THAN(">"),
> > > > LESS_THAN("<"), IN("IN"),
> > > >
> > > > If it is possible, I would like to implement "<=", ">="" and
> "BETWEEN"
> > > > operator types.
> > > >
> > > > From my first review and test, I'm going to write new code in:
> > > >
> > > > FilterItem.java
> > > > - toSql method
> > > > - comparator method
> > > > OperatorType.java
> > > > - new OperatorType <= , >= and BETWEEN
> > > > Query.java
> > > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand
> > without
> > > > operator
> > > >
> > > > From your point of view, Do you have other ideas in mind?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > >
> > > > Francisco Javier Cano
> > > > Senior Developer
> > > >
> > > >
> > > > <http://www.stratio.com/>
> > > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > > 28224 Pozuelo de Alarcón, Madrid
> > > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD
> >*
> > > >
> > >
> >
> >
> >
> > --
> >
> > Francisco Javier Cano
> > Senior Developer
> >
> >
> > <http://www.stratio.com/>
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón, Madrid
> > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> >
>



-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
I am still a bit unsure about the BETWEEN operator. Partly because I've
never used it in any database myself :-) But I was also reading a bit about
it [1] and found that it is implemented differently in different databases
with regard to whether it includes or excludes the boundary values. For
this reason I would actually prefer using 2x "greater/less than" filter
items instead of a single "between" filter item. Our queries should have
the same meaning on all databases.

Another little thing I found is that "NOT BETWEEN" is also an option. We
might choose not to implement that, but just wanted to bring it to the
table. Sorry if I'm now just making it more complex :-P

2014-09-17 11:08 GMT+02:00 Francisco Javier Cano Bailen <fj...@stratio.com>
:

> Hello,
>
> I performed some test and my first idea is:
>
> Manage operator field for BETWEEN operand as an array/list with size 2 (~
> to IN).
>
> I have developed a skeleton and I'm fixing some tests.
>
> Do you have other ideas?
>
> Regards,
>
> 2014-09-16 12:59 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> > Hi Francisco,
> >
> > These sound like cool additions in deed. I think you're right wrt. where
> > the impact would be.
> >
> > Would also need to check other modules that does smart things with query
> > optimizations, but that comes second.
> >
> > Not sure how to fix the BETWEEN case since FilterItem only takes one
> > operand. Any ideas?
> > Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> > fjcano@stratio.com>:
> >
> > > Hello,
> > >
> > > Thanks Kasper for your first support.
> > >
> > > Regarding the OperatorType, MetaModel provides:
> > >
> > > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"), GREATER_THAN(">"),
> > > LESS_THAN("<"), IN("IN"),
> > >
> > > If it is possible, I would like to implement "<=", ">="" and "BETWEEN"
> > > operator types.
> > >
> > > From my first review and test, I'm going to write new code in:
> > >
> > > FilterItem.java
> > > - toSql method
> > > - comparator method
> > > OperatorType.java
> > > - new OperatorType <= , >= and BETWEEN
> > > Query.java
> > > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand
> without
> > > operator
> > >
> > > From your point of view, Do you have other ideas in mind?
> > >
> > > Regards,
> > >
> > > --
> > >
> > > Francisco Javier Cano
> > > Senior Developer
> > >
> > >
> > > <http://www.stratio.com/>
> > > Avenida de Europa, 26. Ática 5. 3ª Planta
> > > 28224 Pozuelo de Alarcón, Madrid
> > > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> > >
> >
>
>
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Francisco Javier Cano Bailen <fj...@stratio.com>.
Hello,

I performed some test and my first idea is:

Manage operator field for BETWEEN operand as an array/list with size 2 (~
to IN).

I have developed a skeleton and I'm fixing some tests.

Do you have other ideas?

Regards,

2014-09-16 12:59 GMT+02:00 Kasper Sørensen <i....@gmail.com>:

> Hi Francisco,
>
> These sound like cool additions in deed. I think you're right wrt. where
> the impact would be.
>
> Would also need to check other modules that does smart things with query
> optimizations, but that comes second.
>
> Not sure how to fix the BETWEEN case since FilterItem only takes one
> operand. Any ideas?
> Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
> fjcano@stratio.com>:
>
> > Hello,
> >
> > Thanks Kasper for your first support.
> >
> > Regarding the OperatorType, MetaModel provides:
> >
> > EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"), GREATER_THAN(">"),
> > LESS_THAN("<"), IN("IN"),
> >
> > If it is possible, I would like to implement "<=", ">="" and "BETWEEN"
> > operator types.
> >
> > From my first review and test, I'm going to write new code in:
> >
> > FilterItem.java
> > - toSql method
> > - comparator method
> > OperatorType.java
> > - new OperatorType <= , >= and BETWEEN
> > Query.java
> > - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand without
> > operator
> >
> > From your point of view, Do you have other ideas in mind?
> >
> > Regards,
> >
> > --
> >
> > Francisco Javier Cano
> > Senior Developer
> >
> >
> > <http://www.stratio.com/>
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón, Madrid
> > Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
> >
>



-- 

Francisco Javier Cano
Senior Developer


<http://www.stratio.com/>
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*

Re: New operator types. "<=" ">=" and "BETWEEN"

Posted by Kasper Sørensen <i....@gmail.com>.
Hi Francisco,

These sound like cool additions in deed. I think you're right wrt. where
the impact would be.

Would also need to check other modules that does smart things with query
optimizations, but that comes second.

Not sure how to fix the BETWEEN case since FilterItem only takes one
operand. Any ideas?
Den 16/09/2014 11.52 skrev "Francisco Javier Cano Bailen" <
fjcano@stratio.com>:

> Hello,
>
> Thanks Kasper for your first support.
>
> Regarding the OperatorType, MetaModel provides:
>
> EQUALS_TO("="), DIFFERENT_FROM("<>"), LIKE("LIKE"), GREATER_THAN(">"),
> LESS_THAN("<"), IN("IN"),
>
> If it is possible, I would like to implement "<=", ">="" and "BETWEEN"
> operator types.
>
> From my first review and test, I'm going to write new code in:
>
> FilterItem.java
> - toSql method
> - comparator method
> OperatorType.java
> - new OperatorType <= , >= and BETWEEN
> Query.java
> - BETWEEN operator syntax is BETWEEN X AND Y => manage Y operand without
> operator
>
> From your point of view, Do you have other ideas in mind?
>
> Regards,
>
> --
>
> Francisco Javier Cano
> Senior Developer
>
>
> <http://www.stratio.com/>
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 352 59 42 // *@stratiobd <https://twitter.com/StratioBD>*
>