[🍒][PLUGIN-1874] Add MariadbDBRecord Implementations #576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🍒 [cherrypick]
Commits :
PR:
Add MariadbDBRecord Implementations
Jira : Plugin-1874
Description
Add class
MariadbDBRecordextendingMysqlDBRecord, to fixjava.lang.ClassNotFoundException: Class io.cdap.plugin.db.DBRecord not found.Tests
Test Case 1 (schema detection)
MySql

Mariadb

Test Case 2 (Write to file sink and diff to check difference)
{ "id": 1, "name": "Alice Johnson", "age": 30, "birthdate": 8535, "year_of_birth": 1993, "salary": 55000.00, "is_active": 1, "created_at": 1696161600000000, "profile_picture": [ 98, 105, 110, 97, 114, 121, 32, 100, 97, 116, 97, 32, 102, 111, 114, 32, 65, 108, 105, 99, 101 ], "description": "Software Engineer", "rating": 4.5, "json_data": "{\"hobbies\": [\"reading\", \"gaming\"]}", "char_field": "A123", "tinyint_field": 1, "smallint_field": 100, "mediumint_field": 1000, "bigint_field": 10000, "double_field": 10.5 } { "id": 2, "name": "Bob Smith", "age": 25, "birthdate": 10458, "year_of_birth": 1998, "salary": 45000.00, "is_active": 1, "created_at": 1696161600000000, "profile_picture": [ 98, 105, 110, 97, 114, 121, 32, 100, 97, 116, 97, 32, 102, 111, 114, 32, 66, 111, 98 ], "description": "Data Analyst", "rating": 4.0, "json_data": "{\"hobbies\": [\"sports\", \"music\"]}", "char_field": "B456", "tinyint_field": 2, "smallint_field": 200, "mediumint_field": 2000, "bigint_field": 20000, "double_field": 20.5 } { "id": 3, "name": "Charlie Brown", "age": 35, "birthdate": 6938, "year_of_birth": 1988, "salary": 60000.00, "is_active": 0, "created_at": 1696161600000000, "profile_picture": [ 98, 105, 110, 97, 114, 121, 32, 100, 97, 116, 97, 32, 102, 111, 114, 32, 67, 104, 97, 114, 108, 105, 101 ], "description": "Project Manager", "rating": 3.799999952316284, "json_data": "{\"hobbies\": [\"traveling\", \"cooking\"]}", "char_field": "C789", "tinyint_field": 3, "smallint_field": 300, "mediumint_field": 3000, "bigint_field": 30000, "double_field": 30.5 } { "id": 4, "name": "Diana Prince", "age": 28, "birthdate": 9199, "year_of_birth": 1995, "salary": 52000.00, "is_active": 1, "created_at": 1696161600000000, "profile_picture": [ 98, 105, 110, 97, 114, 121, 32, 100, 97, 116, 97, 32, 102, 111, 114, 32, 68, 105, 97, 110, 97 ], "description": "Marketing Specialist", "rating": 4.199999809265137, "json_data": "{\"hobbies\": [\"photography\", \"writing\"]}", "char_field": "D012", "tinyint_field": 4, "smallint_field": 400, "mediumint_field": 4000, "bigint_field": 40000, "double_field": 40.5 } { "id": 5, "name": "Ethan Hunt", "age": 40, "birthdate": 4953, "year_of_birth": 1983, "salary": 70000.00, "is_active": 1, "created_at": 1696161600000000, "profile_picture": [ 98, 105, 110, 97, 114, 121, 32, 100, 97, 116, 97, 32, 102, 111, 114, 32, 69, 116, 104, 97, 110 ], "description": "Operations Manager", "rating": 4.800000190734863, "json_data": "{\"hobbies\": [\"fitness\", \"gaming\"]}", "char_field": "E345", "tinyint_field": 5, "smallint_field": 500, "mediumint_field": 5000, "bigint_field": 50000, "double_field": 50.5 }