Title: Different rows not reported when comparing collections of non objects · Issue #835 · utPLSQL/utPLSQL · GitHub
Open Graph Title: Different rows not reported when comparing collections of non objects · Issue #835 · utPLSQL/utPLSQL
X Title: Different rows not reported when comparing collections of non objects · Issue #835 · utPLSQL/utPLSQL
Description: When reporting differences in collections of base datatypes ( number, varchar2 ) the different rows are not reported the system only says: Rows: [ 1 differences ] All rows are different as the columns are not matchin It looks like it is ...
Open Graph Description: When reporting differences in collections of base datatypes ( number, varchar2 ) the different rows are not reported the system only says: Rows: [ 1 differences ] All rows are different as the colu...
X Description: When reporting differences in collections of base datatypes ( number, varchar2 ) the different rows are not reported the system only says: Rows: [ 1 differences ] All rows are different as the colu...
Opengraph URL: https://github.com/utPLSQL/utPLSQL/issues/835
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Different rows not reported when comparing collections of non objects","articleBody":"When reporting differences in collections of base datatypes ( number, varchar2 ) the different rows are not reported the system only says:\r\n```\r\nRows: [ 1 differences ]\r\n All rows are different as the columns are not matchin\r\n```\r\nIt looks like it is getting confused by the fact that the rows are not object. \r\nWhen reporting differences in collections of object types the different rows will be reported:\r\n```\r\nRows: [ 1 differences ]\r\n Row No. 2 - Actual: \u003cID>3\u003c/ID>\r\n Row No. 2 - Expected: \u003cID>2\u003c/ID>\r\n```\r\nI tried taking a look at the code that decides that the the rows are of different type, but I'm not familiar enough with the methods used to figure it out.\r\n\r\nHere is a test case \r\n```sql\r\ncreate or replace type num_list is varray(14) of number;\r\n/\r\ncreate or replace type str_list is varray(14) of varchar2(100);\r\n/\r\ncreate or replace type t_obj as object(ID number);\r\n/\r\ncreate or replace type obj_list as varray(14) of t_obj;\r\n/\r\n\r\ncreate or replace package test_collections as \r\n\r\n\t--%suite(compare collection types)\r\n\r\n --%test(equal num_lists)\r\n procedure equal_num_lists;\r\n\r\n --%test(not equal num_lists)\r\n procedure not_equal_num_lists;\r\n\t\r\n --%test(equal str_lists)\r\n procedure equal_str_lists;\r\n\r\n --%test(not equal str_lists)\r\n procedure not_equal_str_lists;\r\n\t\r\n\r\n --%test(equal obj_lists)\r\n procedure equal_obj_lists;\r\n\r\n --%test(not equal obj_lists)\r\n procedure not_equal_obj_lists;\r\n\t\r\nend test_collections;\r\n/\r\n\r\ncreate or replace package body test_collections as \r\n\r\n nl_expected num_list := num_list(1,2,3);\r\n\tsl_expected str_list := str_list('A','B','C');\r\n\tol_expected obj_list := obj_list(t_obj(1),t_obj(2),t_obj(3));\r\n\r\n procedure equal_num_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(num_list(1,2,3)) ).to_equal(anydata.convertCollection(nl_expected) );\r\n\tend;\r\n\t\t \r\n procedure not_equal_num_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(num_list(1,3,3)) ).to_equal(anydata.convertCollection(nl_expected) );\r\n\tend;\r\n\t\r\n procedure equal_str_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(str_list('A','B','C')) ).to_equal(anydata.convertCollection(sl_expected) );\r\n\tend;\r\n\r\n procedure not_equal_str_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(str_list('A','C','C')) ).to_equal(anydata.convertCollection(sl_expected) );\r\n\tend;\r\n\t\r\n\tprocedure equal_obj_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(obj_list(t_obj(1),t_obj(2),t_obj(3))) ).to_equal(anydata.convertCollection(ol_expected) );\r\n\tend;\r\n\r\n procedure not_equal_obj_lists is \r\n\tbegin\r\n\t ut.expect( anydata.convertCollection(obj_list(t_obj(1),t_obj(3),t_obj(3))) ).to_equal(anydata.convertCollection(ol_expected) );\r\n\tend;\r\n\t\r\nend test_collections;\r\n/\r\n\r\nbegin\r\n\tut.run('test_collections');\r\nend;\r\n/\r\n```\r\nwhich gives this output:\r\n```\r\ncompare collection types\r\n equal num_lists [,984 sec]\r\n not equal num_lists [,019 sec] (FAILED - 1)\r\n equal str_lists [,015 sec]\r\n not equal str_lists [,01 sec] (FAILED - 2)\r\n equal obj_lists [,06 sec]\r\n not equal obj_lists [,26 sec] (FAILED - 3)\r\n \r\nFailures:\r\n \r\n 1) not_equal_num_lists\r\n Actual: ursus.num_list [ count = 3 ] was expected to equal: ursus.num_list [ count = 3 ]\r\n Diff:\r\n Rows: [ 1 differences ]\r\n All rows are different as the columns are not matching.\r\n at \"URSUS.TEST_COLLECTIONS\", line 14 \t ut.expect( anydata.convertCollection(num_list(1,3,3)) ).to_equal(anydata.convertCollection(nl_expected) );\r\n \r\n \r\n 2) not_equal_str_lists\r\n Actual: ursus.str_list [ count = 3 ] was expected to equal: ursus.str_list [ count = 3 ]\r\n Diff:\r\n Rows: [ 1 differences ]\r\n All rows are different as the columns are not matching.\r\n at \"URSUS.TEST_COLLECTIONS\", line 24 \t ut.expect( anydata.convertCollection(str_list('A','C','C')) ).to_equal(anydata.convertCollection(sl_expected) );\r\n \r\n \r\n 3) not_equal_obj_lists\r\n Actual: ursus.obj_list [ count = 3 ] was expected to equal: ursus.obj_list [ count = 3 ]\r\n Diff:\r\n Rows: [ 1 differences ]\r\n Row No. 2 - Actual: \u003cID>3\u003c/ID>\r\n Row No. 2 - Expected: \u003cID>2\u003c/ID>\r\n at \"URSUS.TEST_COLLECTIONS\", line 34 \t ut.expect( anydata.convertCollection(obj_list(t_obj(1),t_obj(3),t_obj(3))) ).to_equal(anydata.convertCollection(ol_expected) );\r\n \r\n \r\nFinished in 1,351811 seconds\r\n6 tests, 3 failed, 0 errored, 0 disabled, 0 warning(s)\r\n```","author":{"url":"https://github.com/blitzkopf","@type":"Person","name":"blitzkopf"},"datePublished":"2019-02-16T00:56:15Z","url":"https://github.com/utPLSQL/utPLSQL/issues/835"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7cf46fa-cc96-f8e2-d521-36be14e1ea79 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 925E:1760D:2F6348:3F5911:6B04B85E |
| html-safe-nonce | 8392c374044c4d3d6e9a5da56848afc0c3c9193d60f250b3552c7b74914d1994 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjVFOjE3NjBEOjJGNjM0ODozRjU5MTE6NkIwNEI4NUUiLCJ2aXNpdG9yX2lkIjoiMjg0Mzk1ODY3NzU0NTk5MDIzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6d6a365e901aba54c108f270c1c58b268000402c4421b5f8d34a380b3c29063 |
| hovercard-subject-tag | issue:411005259 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/utPLSQL/utPLSQL/835/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a1e3691449e32d0fe841ff4175b8c1c6ed9a8898d8c57d7e367a2e4aa28a02d/utPLSQL/utPLSQL/issues/835 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a1e3691449e32d0fe841ff4175b8c1c6ed9a8898d8c57d7e367a2e4aa28a02d/utPLSQL/utPLSQL/issues/835 |
| og:image:alt | When reporting differences in collections of base datatypes ( number, varchar2 ) the different rows are not reported the system only says: Rows: [ 1 differences ] All rows are different as the colu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | blitzkopf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7 |
| turbo-cache-control | no-preview |
| go-import | github.com/utPLSQL/utPLSQL git https://github.com/utPLSQL/utPLSQL.git |
| octolytics-dimension-user_id | 15661281 |
| octolytics-dimension-user_login | utPLSQL |
| octolytics-dimension-repository_id | 50728220 |
| octolytics-dimension-repository_nwo | utPLSQL/utPLSQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 50728220 |
| octolytics-dimension-repository_network_root_nwo | utPLSQL/utPLSQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b032e77f1ea437ede6c115446a0a467709b468e7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width