Skip to content

Commit

Permalink
Merge pull request #1551 from aksharauke:ittest
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 633654363
  • Loading branch information
cloud-teleport committed May 14, 2024
2 parents facf1ce + 19c59dd commit fd0cec6
Show file tree
Hide file tree
Showing 6 changed files with 1,811 additions and 0 deletions.
31 changes: 31 additions & 0 deletions v2/spanner-change-streams-to-sharded-file-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,37 @@
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>com.google.cloud.teleport</groupId>
<artifactId>it-google-cloud-platform</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud.teleport</groupId>
<artifactId>it-conditions</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-it-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
<scope>test</scope>
</dependency>
<!-- TODO - Remove when https://github.com/apache/beam/pull/29732 is released. -->
<dependency>
<groupId>com.google.cloud.teleport</groupId>
<artifactId>it-jdbc</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public static BigDecimal toNumericBigDecimal(
throws DataChangeRecordConvertorException {

String value = toString(changeEvent, key, requiredField);
if (value == null) {
return null;
}
if (NumberUtils.isCreatable(value) || NumberUtils.isParsable(value) || isNumeric(value)) {
return new BigDecimal(value).setScale(9, RoundingMode.HALF_UP);
}
Expand Down
Loading

0 comments on commit fd0cec6

Please sign in to comment.