This change is not needed in this pull request?
This code seems old implementation.

https://github.com/treasure-data/td/commit/01234b01135046cf908e9306dedeaae57fac19f4