Skip to content

Conversation

@MrRahulSharma
Copy link
Contributor

@MrRahulSharma MrRahulSharma commented May 9, 2023

@MrRahulSharma MrRahulSharma changed the title Int datatype changes [Plugin-1614][Plugin-1507][Plugin-1615] Int datatype changes May 9, 2023
@MrRahulSharma MrRahulSharma changed the title [Plugin-1614][Plugin-1507][Plugin-1615] Int datatype changes [Plugin-1614][Plugin-1507][Plugin-1615][Plugin-1611] Int datatype changes May 9, 2023
@MrRahulSharma MrRahulSharma marked this pull request as ready for review May 10, 2023 05:12
@MrRahulSharma MrRahulSharma requested review from albertshau and tivv May 10, 2023 16:42
| BOOL, BOOLEAN | boolean | |
| SMALLINT | int | |
| MEDIUMINT | double | |
| MEDIUMINT | int | Users can manually set output schema to map it to Long. |
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this comment mean? There is no output schema for a sink.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is similar existing comment for YEAR. Seems like this table was just copied from the source? For a sink I would expect to find what CDAP types can be written to which MySQL types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, all the Sink documents present in the database-plugins project contain a copy of mapping details from their source plugins. I believe it might be a little tricky in adding a CDAP to sink type mapping, given we have multiple types mapped to single sink types. I feel that might be a bigger documentation change, which might require some more thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, though can we remove the comments column in the sink doc? I think it's pretty confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will work on this comment in the next set of changes, proposing to take this after this PR submission.

Copy link
Contributor

@albertshau albertshau left a comment

Choose a reason for hiding this comment

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

minor suggestion

Copy link
Contributor

@albertshau albertshau left a comment

Choose a reason for hiding this comment

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

minor suggestion

Copy link
Contributor

@albertshau albertshau left a comment

Choose a reason for hiding this comment

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

minor comment, lgtm

@MrRahulSharma MrRahulSharma merged commit cb4d025 into develop May 12, 2023
@itsankit-google itsankit-google deleted the fix/MediumIntFix branch May 12, 2023 05:56
prop.put(JDBC_PROPERTY_SOCKET_TIMEOUT, "20000");
prop.put(JDBC_REWRITE_BATCHED_STATEMENTS, "true");
// MySQL property to ensure that TINYINT(1) type data is not converted to MySQL Bit/Boolean type in the ResultSet.
prop.put(MYSQL_TINYINT1_IS_BIT, "false");
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it makes sense to use putIfAbsent() so that if user has provided it in connection args in plugin config we don't end up overriding it?

itsmekumari pushed a commit to cloudsufi/database-plugins that referenced this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants