-
- Downloads
Toggle JSON unfolding by field (#28742)
* Use type/JSON instead of type/SerializedJSON * Tidy migration * Update migration * Fix rollback migration for h2 * whitespace * Add test for migration * Fix test * Add rollback * whitespace * Test JSONB type as well as JSON * Don't fingerprint JSON columns * Remove comment, that might be wrong in the future * Update test * Add tests for fingerprinting * Use base-type JSON for fingerprinting base query * Add test for visibility-type=details-only * undo . * Change migration id * Fix migration test * Merge master * Exclude mariadb from tests * Make is-mariadb? public * Migration for adding nfc_enabled * Add nfc_enabled to field settings * Update describe-nested-field-columns to only unfold fields that have not been disabled * Remove spy * Tidy * Fix * Clear nested fields immediately if folding is disabled * Clear nested fields on nfc_enabled change * Trim trailing whitespace * Tidy * Fix * Add enable-json-unfolding-test * Move to field api test * nfc_enabled -> json_unfolding * Tidy test * Make json-unfolding in database details just the default for new settings * Restore original visibility-type logic * Fix * Sync field json_unfolding according to db json_folding * Rename to json-unfolding-default * Add test for the case when the json-unfolding is false for the database * Implement default json unfolding for first sync * Update comment * Update comment * Restore PUT field * Migration for populating json_unfolding for mysql and postgres * Remove migration and use default on the frontend instead * Update json-unfolding database setting copy * Move Unfold JSON setting under semantic type setting * Separate sentences with spaces * Capitalize * Restore handleChangeSemanticType * Use base_type TYPE.JSON instead * Change order of migrations * Add h2 migration * Add test for migration * Update test description * Remove validCheckSum Co-authored-by:Ngoc Khuat <qn.khuat@gmail.com> * Use ?? instead of || * Fix tests * Remove outdated serdes stuff * Remove unnecessary and * Fix mysql migration * Remove unused require * Fix test * Add false default value for json_unfolding * Fix json-unfolding nil case * Other suggestions * whitespace * Tidy describe-nested-field-columns * Update comment * Remove unused clear-nested-fields! * Remove unused return value * Fix H2 migration to use base_type not database_type * Always set json-unfolding during sync * Fix test * Fix test * Fix test * Add comment explaining nested-field-column support for MySQL * Fix tests * Fix tests * Fix test * Fix test * Default json_unfolding to false for new fields * Fix merge * Add json_unfolding to mock tables * Don't capitalize prepositions * Update setting description * whitespace * whitespace * Fix fetch_metadata * Fix fetch_metadata * Fix tests * Fix test * Fix clj-kondo * Remove postgres database-supports test * Fix postgres test * Fix postgres test * Fix mysql migration * Fix clj-kondo * Don't test mariadb * Fix mysql test * Fix mysql json-unfolding nil case * Add comments to test * Add upterm step to mariadb test * Move upterm step before tests * Fix postgresql migration * move upterm step to test-driver action * Remove upterm step from drivers.yml * Comment out everything else in test-driver * Fix mariadb migration * Remove upterm action * Whitespace * Only handle JSONObjects with JSON_VALUE, not JSONArray * Fix fields.sync_metadata/update-field-metadata-if-needed! * Add comment explaining `json-unfolding-default` * Add comment for JSON_VALUE test * Update json-unfolding-default-true-test to use fresh db * Fix test descriptions * Don't capitalize setting display name * Fix update json_unfolding * Fix unfolding json for only one JSON column, not all * Add e2e test for JSON unfolding setting * Fix test * whitespace * Fix test * Fix json-unfolding for nested field columns * Fix mysql and postgres tests for nested field columns * Coerce nil json-unfolding to false for sync_metadata * Add test for nil json-unfolding for sync_metadata * Fix test * Don't update json_unfolding from intial sync * Add json_unfolding to update-field-test * Fix tests --------- Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
Showing
- e2e/test/scenarios/admin/datamodel/field.cy.spec.js 52 additions, 1 deletione2e/test/scenarios/admin/datamodel/field.cy.spec.js
- frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx 30 additions, 1 deletion...tend/src/metabase/admin/datamodel/containers/FieldApp.jsx
- modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj 4 additions, 2 deletions...drivers/snowflake/test/metabase/driver/snowflake_test.clj
- modules/drivers/sqlite/test/metabase/driver/sqlite_test.clj 6 additions, 5 deletionsmodules/drivers/sqlite/test/metabase/driver/sqlite_test.clj
- resources/migrations/000_migrations.yaml 55 additions, 1 deletionresources/migrations/000_migrations.yaml
- src/metabase/api/field.clj 16 additions, 19 deletionssrc/metabase/api/field.clj
- src/metabase/db/liquibase/h2.clj 27 additions, 1 deletionsrc/metabase/db/liquibase/h2.clj
- src/metabase/driver/common.clj 3 additions, 3 deletionssrc/metabase/driver/common.clj
- src/metabase/driver/mysql.clj 4 additions, 5 deletionssrc/metabase/driver/mysql.clj
- src/metabase/driver/postgres.clj 4 additions, 6 deletionssrc/metabase/driver/postgres.clj
- src/metabase/driver/sql_jdbc/sync/describe_table.clj 43 additions, 27 deletionssrc/metabase/driver/sql_jdbc/sync/describe_table.clj
- src/metabase/models/database.clj 15 additions, 1 deletionsrc/metabase/models/database.clj
- src/metabase/sync/interface.clj 1 addition, 0 deletionssrc/metabase/sync/interface.clj
- src/metabase/sync/sync_metadata/fields/fetch_metadata.clj 3 additions, 1 deletionsrc/metabase/sync/sync_metadata/fields/fetch_metadata.clj
- src/metabase/sync/sync_metadata/fields/sync_instances.clj 30 additions, 29 deletionssrc/metabase/sync/sync_metadata/fields/sync_instances.clj
- test/metabase/api/field_test.clj 83 additions, 0 deletionstest/metabase/api/field_test.clj
- test/metabase/cmd/dump_to_h2_test.clj 1 addition, 1 deletiontest/metabase/cmd/dump_to_h2_test.clj
- test/metabase/cmd/rotate_encryption_key_test.clj 5 additions, 5 deletionstest/metabase/cmd/rotate_encryption_key_test.clj
- test/metabase/db/schema_migrations_test.clj 48 additions, 0 deletionstest/metabase/db/schema_migrations_test.clj
- test/metabase/driver/mysql_test.clj 13 additions, 16 deletionstest/metabase/driver/mysql_test.clj
Loading
Please register or sign in to comment