test_class.declarator: payload
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MySQLPacketPayload payload;
test_class.type: MySQLPacketPayload
test_class.var_name: payload
test_class.declarator: columnDef
test_class.modifier: private
test_class.original_string: private MySQLBinlogColumnDef columnDef;
test_class.type: MySQLBinlogColumnDef
test_class.var_name: columnDef
test_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/decimal/MySQLDecimalBinlogProtocolValueTest.java
test_class.identifier: MySQLDecimalBinlogProtocolValueTest
test_case.body: @Test
      public void assertDecodeNegativeNewDecimalWithLargeNumber() {
          columnDef = new MySQLBinlogColumnDef(MySQLColumnType.MYSQL_TYPE_NEWDECIMAL);
          columnDef.setColumnMeta(32 << 8 | 6);
          byte[] newDecimalBytes = ByteBufUtil.decodeHexDump("7DFEFDB5CC2741EFDEBE4154FD52E7");
          when(payload.readStringFixByBytes(newDecimalBytes.length)).thenReturn(newDecimalBytes);
          BigDecimal actual = (BigDecimal) new MySQLDecimalBinlogProtocolValue().read(columnDef, payload);
          assertThat(actual.toString(), is("-33620554869842448557956779.175384"));
      }
test_case.class_method_signature: MySQLDecimalBinlogProtocolValueTest.assertDecodeNegativeNewDecimalWithLargeNumber()
test_case.full_signature: @Test public void assertDecodeNegativeNewDecimalWithLargeNumber()
test_case.identifier: assertDecodeNegativeNewDecimalWithLargeNumber
test_case.invocations: setColumnMeta decodeHexDump thenReturn when readStringFixByBytes read assertThat toString is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertDecodeNegativeNewDecimalWithLargeNumber()
focal_class.declarator: DEC_BYTE_SIZE = 4
focal_class.modifier: private static final
focal_class.original_string: private static final int DEC_BYTE_SIZE = 4;
focal_class.type: int
focal_class.var_name: DEC_BYTE_SIZE
focal_class.declarator: DIG_PER_DEC = 9
focal_class.modifier: private static final
focal_class.original_string: private static final int DIG_PER_DEC = 9;
focal_class.type: int
focal_class.var_name: DIG_PER_DEC
focal_class.declarator: DIG_TO_BYTES = {0, 1, 1, 2, 2, 3, 3, 4, 4, 4}
focal_class.modifier: private static final
focal_class.original_string: private static final int[] DIG_TO_BYTES = {0, 1, 1, 2, 2, 3, 3, 4, 4, 4};
focal_class.type: int[]
focal_class.var_name: DIG_TO_BYTES
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/decimal/MySQLDecimalBinlogProtocolValue.java
focal_class.identifier: MySQLDecimalBinlogProtocolValue
focal_class.interfaces: implements MySQLBinlogProtocolValue
focal_class.class_method_signature: MySQLDecimalBinlogProtocolValue.read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.full_signature: @Override public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.return: Serializable
focal_class.signature: Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLDecimalBinlogProtocolValue.toDecimal(final DecimalMetaData metaData, final byte[] value)
focal_class.full_signature: private static BigDecimal toDecimal(final DecimalMetaData metaData, final byte[] value)
focal_class.identifier: toDecimal
focal_class.modifiers: private static
focal_class.parameters: (final DecimalMetaData metaData, final byte[] value)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal toDecimal(final DecimalMetaData metaData, final byte[] value)
focal_class.class_method_signature: MySQLDecimalBinlogProtocolValue.decodeIntegerValue(final DecimalMetaData metaData, final byte[] value)
focal_class.full_signature: private static BigDecimal decodeIntegerValue(final DecimalMetaData metaData, final byte[] value)
focal_class.identifier: decodeIntegerValue
focal_class.modifiers: private static
focal_class.parameters: (final DecimalMetaData metaData, final byte[] value)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal decodeIntegerValue(final DecimalMetaData metaData, final byte[] value)
focal_class.class_method_signature: MySQLDecimalBinlogProtocolValue.decodeScaleValue(final DecimalMetaData metaData, final byte[] value)
focal_class.full_signature: private static BigDecimal decodeScaleValue(final DecimalMetaData metaData, final byte[] value)
focal_class.identifier: decodeScaleValue
focal_class.modifiers: private static
focal_class.parameters: (final DecimalMetaData metaData, final byte[] value)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal decodeScaleValue(final DecimalMetaData metaData, final byte[] value)
focal_class.class_method_signature: MySQLDecimalBinlogProtocolValue.readFixedLengthIntBE(final byte[] bytes, final int offset, final int length)
focal_class.full_signature: private static int readFixedLengthIntBE(final byte[] bytes, final int offset, final int length)
focal_class.identifier: readFixedLengthIntBE
focal_class.modifiers: private static
focal_class.parameters: (final byte[] bytes, final int offset, final int length)
focal_class.return: int
focal_class.signature: int readFixedLengthIntBE(final byte[] bytes, final int offset, final int length)
focal_method.body: @Override
      public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
          DecimalMetaData decimalMetaData = new DecimalMetaData(columnDef.getColumnMeta());
          return toDecimal(decimalMetaData, payload.readStringFixByBytes(decimalMetaData.getTotalByteLength()));
      }
focal_method.class_method_signature: MySQLDecimalBinlogProtocolValue.read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.full_signature: @Override public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.identifier: read
focal_method.invocations: getColumnMeta toDecimal readStringFixByBytes getTotalByteLength
focal_method.modifiers: @Override public
focal_method.parameters: (final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.return: Serializable
focal_method.signature: Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)