Thank you so much for your reply, Julian. I will try adding user-defined function first.
Sincerely, Junwei Li On Fri, Aug 4, 2017 at 1:30 PM, Julian Hyde <[email protected]> wrote: > "<>" is a built-in operator in standard SQL and in Calcite, so that > might be tricky. > > If you were to add a new operator, say "<=>", you'd have to change the > parser, and also add an entry to the operator table > (SqlStdOperatorTable or similar). > > If you can live with function syntax (as opposed to operator syntax) > it's easier to use use add a user-defined function. > > Julian > > > On Fri, Aug 4, 2017 at 11:06 AM, Junwei Li <[email protected]> > wrote: > > Hi, > > > > I am a newbie to Calcite and SQL. Recently, I am trying to develop a > > calcite adapter for a new kind of data source. This data source has some > > different operators compared to SQL. For example, in SQL, if we want to > > find all rows that don't contain a certain keyword: > > > > select * from table where value not like 'abc%' > > > > > > In this new data source, the query string is: > > > > > > select * from table where value <> 'abc%' > > > > > > > > So in this data source, <> is a new operator. > > > > > > As of now, I have to manually generate the where clause in the filter > rule. > > Does Calcite support adding new operator, so that it can automatically > > translate? Thanks! > > > > > > Sincerely, > > Junwei Li >
