soumyakanti3578 commented on code in PR #6481: URL: https://github.com/apache/hive/pull/6481#discussion_r3313053901
########## ql/src/test/queries/clientpositive/show_columns_like.q: ########## @@ -0,0 +1,27 @@ +CREATE DATABASE IF NOT EXISTS col_test_db; +USE col_test_db; + +CREATE TABLE wildcard_table ( + id_primary INT, + id_secondary INT, + name_first STRING, + name_last STRING, + MixedCaseColumn INT, + another_Mixed_Col STRING +); + +SHOW COLUMNS FROM wildcard_table LIKE 'id%'; +SHOW COLUMNS FROM wildcard_table LIKE 'name_%'; +-- Case Insensitivity test +SHOW COLUMNS FROM wildcard_table LIKE 'mixedcase%'; +SHOW COLUMNS FROM wildcard_table LIKE 'another_mixed_col'; +SHOW COLUMNS FROM wildcard_table LIKE 'id*'; +SHOW COLUMNS FROM wildcard_table LIKE 'id_primary|name_first'; + Review Comment: I think we still need to test escape sequences. For example, add another column to the table - `idxprimary` or something similar, and test with ``` SHOW COLUMNS FROM wildcard_table LIKE 'id\_primary'; ``` which should return just `id_primary` and not `idxprimary`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
