This method "compile" is called twice once for statement.getMetadata and once in statement compile, I'm not sure if this is a wanted behaviour