Answers inline. Thanks,
James

On Thu, Jul 17, 2014 at 1:39 AM, Ahmed Hussien <[email protected]> wrote:
> Hello,
> Good Day...
> I'm working in a project that requires adding new keywords to the regular
> SQL statements and we decided to use Phoenix over hbase.
> I actually have three (3) types of keywords, and I'll Give you an example
> for them below:
>
> 1-  Select (KEYWORD) attribute from table;
> 2- Select (KEYWORD1) attribute from table1 where ((KEYWORD2)
> table1.attribute1= (KEYWORD3)table2.attribute2);
> 3- Select (KEYWORD1) attribute from table1 where ((KEYWORD2)
> table1.attribute1= value);
>
> KEYWORD is some kind of properties for an attribute which we added in our
> project.
> Say for example i want to select the last approved value for a specific
> attribute from a specific table, the keyword here is lastApproved so the
> query would be:
>
> Select lastApproved attribute from table;
>
> Knowing That I have filters for Hbase the do the selection process, and all
> I want to do is to integrate this to pheonix as an SQL command.
>
> The Questions are:
> 1- Which types are supported in Phoenix?
> 2- What is the most easy way to implement these keywords?
> 3- Does built in functions support the three types?
> 4- if you have a detailed guide could you please send it to me

Our detailed guide is on our website: http://phoenix.apache.org/
In particular, take a look at our reference guide:
http://phoenix.apache.org/language/index.html,
http://phoenix.apache.org/language/functions.html,
http://phoenix.apache.org/language/datatypes.html

There's also a step-by-step guide I wrote on adding built-in functions
here: 
http://phoenix-hbase.blogspot.com/2013/04/how-to-add-your-own-built-in-function.html

>
>
> I know that your mission in Phoenix is to be ANSI compatible. but actually
> this is a project requirment. The user have lots of conditions and predicate
> parameters, so we are using some keywords to make it much more simple for
> the user in this specific project.
> I really appriciate it, if you just guide me from where should I start and
> what are the classes I should edit with a very short discription, this would
> be greate.

Changing the SQL grammar does not sound like a project requirement to
me, but rather a means to implement a requirement. SQL has been around
a long time and has withstood the test of time well, IMHO. The typical
way to solve the requirement to "make it much simpler for users in
this specific project to specify conditions and predicates" is to have
a layer above SQL and the Phoenix JDBC driver that generates SQL. I'd
encourage you to take that route, as as you've said, this is outside
of the mission of the Apache Phoenix project.

>
>
> Ahmed

Reply via email to