Sounds plausible. SqlBasicCall was only introduced recently, most operators are 
instantiated as SqlBasicCall but some important/special operators such as 
SqlOrderBy and SqlSelect only extend SqlCall. So I guess only the common case 
was tested.

If you could add a unit test it would help keep this working.

On Jun 12, 2014, at 3:28 PM, Jacques Nadeau <[email protected]> wrote:

> Hey Y'all,
> 
> I'm trying to use SqlShuttle and seeing problems.  Specifically, when
> trying to rewrite SqlOrderBy with the SqlShuttle, if the operands change
> then SqlShuttle calls SqlOrderBy.getOperator().createCall().  However, this
> delegates SqlSpecialOperator and then to SqlOperator which creates a new
> SqlBasicCall as the replacement to SqlOrderBy.  At that point, even doing a
> simple print fails as SqlBasicCall is not an instance of SqlOrderBy.
> 
> Before I try to fix, I want to make sure I'm not misinterpreting the flow.
> 
> thanks,
> Jacques

Reply via email to