[SPARK-4309][SQL] Date type support for Thrift server

My fault, neither the original nor the modified code work, should notice this before merging #2685. Will provide a fix for this in this PR soon.