Skip to content

[CDCSDK] Remove dependency on JDBC connection for decoding values#142

Open
fourpointfour wants to merge 5 commits intomainfrom
cdcsdk-15685-too-many-clients
Open

[CDCSDK] Remove dependency on JDBC connection for decoding values#142
fourpointfour wants to merge 5 commits intomainfrom
cdcsdk-15685-too-many-clients

Conversation

@fourpointfour
Copy link
Contributor

@fourpointfour fourpointfour commented Jan 18, 2023

This PR has the changes for:

  1. Removing the dependency on JDBC connection while decoding values
  2. Modifying a test with the values for arrays as well

@fourpointfour fourpointfour self-assigned this Jan 18, 2023
@@ -0,0 +1,180 @@
package io.debezium.connector.yugabytedb.connection;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is for verifying the changes for the time being. IMO this is not even required as we already send the decoded values from the server, we simply need to parse those values properly which is what the current changes in YugabyteDBValueConverter is doing.


protected synchronized YBArrayList buildArrayList(String fieldString) throws SQLException {
if (this.arrayList == null) {
// TODO Vaibhav: You may need to make the delimiter call dependent on oid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This delimeter call we should do in Connector and send to all the tasks.

dataString = dataString.substring(1, dataString.length() - 1);
return dataString.split(",");
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, can't we just resuse the method of pgArray/YBArray by passing the default delimeter.
Ideally it should be able to handle recursion 2d/3d arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants