Handle java.sql.DECIMAL type correctly in existing database plugins
Current implementation of database plugins does not support mapping of java.sql.DECIMAL type to cdap decimal types.
In addition to that, for java.sql.DECIMAL types, existing implementation tries to map it to either integer or long depending on the precision value. This can be confusing to users because based on the precision the type of the schema changes. https://github.com/cdapio/hydrator-plugins/blob/develop/database-plugins/src/main/java/io/cdap/plugin/DBUtils.java#L264
Also, this type is interpreted as BigDecimal when it is read from the connection. However, when the view schema is clicked, the associated cdap schema uses double.
The user should only see one type that is associated with java.sql.DECIMAL in wrangler as well as database plugins. The proper fix would be to use cdap decimal schema type for java.sql.DECIMAL types in wrangler as well as generic database plugins in hydrator repository.
cherrypicks for dbsink additions:
Please make sure fixes are added for DB sink as well as Wrangler. Also please add unit tests for the fixes added. We should not mark item as completed without that.
The fixes are done for cdc database source plugins.