added distinct clause handling
fixed error in compilated expressions in SELECT containing . expressions