Support decimal data type in 4.*, and reduce logic complexity

I checked the option `unsigned` already.