Currently SqlDialect.getCastSpec() is used to amend types to cast to for different dialects and works during Rel to Sql conversion. That means it cannot be used when unparsing SqlNode tree to a specific dialect. Does somebody know was it made intentionally and would it be better to provide alternative method to convert cast types fully in SqlNode tree that can be used during SqlNode.unparse()?
Thanks, Pavel Gubin