improve sql wall & fix datasource bug