Fix self-join errors
Change test case accordingly
Fix broken tests and fix point-in-time sequences
Merge pull request #690 from maryannxue/master

Fix issue#689 Self-join does not work
bug fix in IndexStatementRewriter and JoinCompiler
Merge pull request #692 from maryannxue/master

Fix issue#689 Self-join does not work