Hi all,
Is there a way to do value transformation for a sql query? For example,
select * from user where user_id = 1234 need to transform to select * from user
where user_id = 5678.
I have tried to create a planner rule similar to JdbcFilterRule which
match the LogicalFilter and created a value transformer visitor to do the value
transformation. But after the optimization phase, ether my cutomized
transformation relnode does not get selected due to the cost is not cheapest or
the transformation has applied multiple times thus the value got transformed to
unexpected value ( 1234 -> 5678 -> 9012 ...). Is this a right place to do such
value transformation?
I also looked at the query parsing phase and try to find a place to get
the parsed sqlnode tree. It seems hard to add a visitor to do the
transformation when traversal the tree.
Could you give some thoughts?
Regards,
Jingwu Li