Code Refactor to support column related feature.

Signed-off-by: Pengcheng Bian <pbian@actuate.com>