|
17 | 17 | import com.fasterxml.jackson.annotation.JsonCreator; |
18 | 18 | import com.fasterxml.jackson.annotation.JsonProperty; |
19 | 19 | import com.fasterxml.jackson.core.JsonProcessingException; |
20 | | -import com.fasterxml.jackson.databind.ObjectMapper; |
21 | | -import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; |
22 | 20 | import com.fasterxml.jackson.dataformat.xml.XmlMapper; |
23 | 21 | import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; |
24 | 22 | import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; |
@@ -56,8 +54,9 @@ public final class VerticaTableStatisticsReader |
56 | 54 | { |
57 | 55 | private static final Logger log = Logger.get(VerticaTableStatisticsReader.class); |
58 | 56 |
|
59 | | - private static final ObjectMapper OBJECT_MAPPER = new XmlMapper(new JacksonXmlModule()) |
60 | | - .disable(FAIL_ON_IGNORED_PROPERTIES, FAIL_ON_UNKNOWN_PROPERTIES); |
| 57 | + private static final XmlMapper XML_MAPPER = (XmlMapper) new XmlMapper() |
| 58 | + .disable(FAIL_ON_IGNORED_PROPERTIES) |
| 59 | + .disable(FAIL_ON_UNKNOWN_PROPERTIES); |
61 | 60 |
|
62 | 61 | // We don't know null fraction in case of nan and null rows, but having no null fraction will make CBO useless. Assume some arbitrary value. |
63 | 62 | private static final Estimate UNKNOWN_NULL_FRACTION_REPLACEMENT = Estimate.of(0.1); |
@@ -216,7 +215,7 @@ Schema getSchemaStatistics(JdbcTableHandle table) |
216 | 215 | .map((rs, ctx) -> { |
217 | 216 | try { |
218 | 217 | String exportStatistics = rs.getString("EXPORT_STATISTICS"); |
219 | | - return OBJECT_MAPPER.readValue(exportStatistics, Schema.class); |
| 218 | + return XML_MAPPER.readValue(exportStatistics, Schema.class); |
220 | 219 | } |
221 | 220 | catch (JsonProcessingException e) { |
222 | 221 | log.warn(e, "Failed to read statistics"); |
|
0 commit comments