hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Furcy Pin <>
Subject Re: Could i use Hive SQL parser in our application?
Date Wed, 18 May 2016 11:11:11 GMT

This is feasible.

I already did it in some tool I developed.
Unfortunately I can't open-source it yet, but I can tell you how I dit it.

There is this class in Hive source code

which shows a simple example where the HiveParser is used.

Getting the AST from a query is as simple as.

ParseDriver pd = new ParseDriver();
ASTNode tree = pd.parse(query);

all you have to do next is deal with the AST to do what you want to do, but
that's the where things get complicated.

On Wed, May 18, 2016 at 12:43 PM, Heng Chen <>

> Hi, guys.
>       Recently,  we need to integrate Hive SQL parser in our application.
> Is there any way to do it?
> Thanks!

View raw message