On Friday, March 01, 2013 07:58:52 AM Justin Deoliveira wrote: > > > - Changes to the CQL/ECQL grammer to allow for date time literals in > > > "normal" binary comparisons. > > > > Short history about this issue: > > > > Some years ago, I found that the BNF grammar (from OGG CSW specification) > > > > did > > > > have a mistake, because the rule <datetime literal> is not present. On the > > other hand you can find a rule for <date-time>, in the temporal predicate > > context. So, I asked for this issue to the OGC's Catalog Wroking Group . > > They > > replied that it is a mistake in the <comparison predicate> rule. Thus > > <datetime literal> should be removed from <literal> rule. They told me > > that > > the idea is to use the <temporal predicates> . > > > > Thus I modified the CQL implementation taking into account the OGC's > > Catalog > > Wroking Group suggestions. > > > > I think we shouldn't include this extension in CQL grammar. > > > > Now that you have included TEQUALS the user can write predicates for "<", > > ">", "=" using temporal rules BEFORE, AFTER and TEQUALS > > Hmmm... this is less than ideal for me, but makes sense now that I realize > that the rationale comes from OGC. > > The biggest thing is simplicity. CQL is so nice because its such a simple > syntax. "=" is much more intuitive than "TEQUALS". And if you think about > someone trying out a filter they wil try "=" before thinking that there is > a special construct for date equality. For example, i myself spent about 15 > minutes trying to determine what the format was for "=" with a date > literal, thinking i just had the wrong datetime format. > > And what about other binary predicates, for example "<=". Yes they can be > expressed with the temporal predicates by doing: > > FOO BEFORE <DT> OR FOO TEQUALS <DT> > > Which seems needlessly verbose compared to: > > FOO <= <DT> > > So if the only argument against not including it is strict compliance with > the spec I would ask that we consider this as an extension to it. The > precedent for which has been set before in GeoTools, mostly notably with > SLD. > > It would be interesting if other devs could weigh in with an opinion on > this one. I understand your point. CQL is the canonical implementation, it is very near of OGC specification. But, sometimes, CQL could be hard. This is the reason why we have created ECQL. Maybe you can add this extensions in the ECQL. ?
-- Mauricio Pazos ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
