[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14166401#comment-14166401 ] Thejas M Nair commented on HIVE-8094: - +1 add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Labels: TODOC14 Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch, HIVE-8094.4.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155307#comment-14155307 ] Jason Dere commented on HIVE-8094: -- I think the changes look fine. [~thejas], should we just have this become the new pattern matching behavior for functions? Makes it consistent with the pattern matching for show tables add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155357#comment-14155357 ] Thejas M Nair commented on HIVE-8094: - I didn't realize that show tables had LIKE as an optional keyword. In terms of backward compatiblity , it looks like the case where user hits this issue is going be rare. If user had foo.* , now it gets translated into foo..* . Ie it would still match function fooabc but stop matching fooa . Is that right [~peter_liu] ? Ie the test cases that were removed in the initial patches don't need to be removed. The probability of a user using 'show functions' in a script and also hitting this use case seems quite low. ie, I am leaning towards Jason's suggestion of changing the behavior of existing show-functions syntax as well. Sorry about the back and forth on this Peter! add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155416#comment-14155416 ] peter liu commented on HIVE-8094: - bq. If user had foo.\* , now it gets translated into foo..\* . Ie it would still match function fooabc but stop matching fooa . Is that right? Right. If we go back to HIVE-8094.2.patch which changes the pattern matching behavior, pattern foo.\* wouldn't work as before, that is the reason I removed those foo.\* test cases. Please suggest which patch we should go with. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155457#comment-14155457 ] Thejas M Nair commented on HIVE-8094: - [~peter_liu] Looking at the tests in existing show_functions.q and its q.out file , it looks like the only change in q.out output would be the udf e, it will stop matching .*e . All other output should remain the same. Is that right ? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155474#comment-14155474 ] peter liu commented on HIVE-8094: - Hi, [~thejas] All original test results will be changed except for the first one: SHOW FUNCTIONS; SHOW FUNCTIONS '^c.*'; SHOW FUNCTIONS '.*e$'; SHOW FUNCTIONS 'log.*'; SHOW FUNCTIONS '.*date.*'; SHOW FUNCTIONS '***'; add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155836#comment-14155836 ] Thejas M Nair commented on HIVE-8094: - Thats right lot of functions don't end up matching .\*date.\* . I think this would be a common scenario, and likely to break existing scripts. I propose going with the 3.patch approach that retains backward compatibility. Also deprecate the old syntax without LIKE and print a warning asking people to use the new syntax. In documentation, we document the new syntax and the old syntax as the deprecated syntax. [~jdere] What do you think ? Some of the changes to q.out with the 2.patch applied - {code} --- a/ql/src/test/results/clientpositive/show_functions.q.out +++ b/ql/src/test/results/clientpositive/show_functions.q.out @@ -232,7 +232,6 @@ case coalesce current_database decode -e encode explode first_value @@ -265,18 +264,211 @@ PREHOOK: query: SHOW FUNCTIONS 'log.*' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS 'log.*' POSTHOOK: type: SHOWFUNCTIONS -log log10 log2 PREHOOK: query: SHOW FUNCTIONS '.*date.*' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS '.*date.*' POSTHOOK: type: SHOWFUNCTIONS -date_add -date_sub -datediff -to_date {code} add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155860#comment-14155860 ] Jason Dere commented on HIVE-8094: -- ok, +1 to patch v3 add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14155981#comment-14155981 ] Thejas M Nair commented on HIVE-8094: - I have added some comments to review board. I think we should log a warning for the old syntax use saying that it is deprecated and suggest the new syntax. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Labels: TODOC14 Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14154064#comment-14154064 ] peter liu commented on HIVE-8094: - [~thejas] [~jdere] guys, do I need to make further changes to this patch? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152379#comment-14152379 ] Jason Dere commented on HIVE-8094: -- Is this doing functionality any different than the pattern matching we're currently able to do for SHOW FUNCTIONS? {noformat} hive create temporary function tmp_fn1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFRound'; OK Time taken: 0.012 seconds hive create function my_fn1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFRound'; OK Time taken: 0.084 seconds hive show functions '.*fn.*'; OK default.my_fn1 tmp_fn1 {noformat} add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152385#comment-14152385 ] Jason Dere commented on HIVE-8094: -- Ok, it looks like the example I have requires '.*fn' as opposed to just '*fn' Rather than adding the LIKE syntax, would you be able to update the function pattern matching to allow '*'? I think the SHOW TABLE has some code to substitute '*' with '.*' when creating the pattern matcher, would you be able to do something like that for SHOW FUNCTION as well? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152416#comment-14152416 ] peter liu commented on HIVE-8094: - [~jdere] Thanks for your comments. Actually, this patch does exactly what you asked for: make the SHOW FUNCTIONS LIKE pattern work in the same way as SHOW TABLE. You can see I substitute '*' with '.*' from the code review. Another difference from 'SHOW FUNCTIONS [pattern]' is, 'SHOW FUNCTIONS LIKE [pattern]' will also search the functions which have been registered on metastore, which could fix the bug that 'SHOW FUNCTIONS [pattern]' couldn't list the functions registered on metastore. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152424#comment-14152424 ] Thejas M Nair commented on HIVE-8094: - I think there is value in supporting the LIKE syntax so that it is consistent with other common show commands. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152455#comment-14152455 ] peter liu commented on HIVE-8094: - [~thejas] you mean using showStmtIdentifier instead of showFunctionIdentifier in HiveParser.g? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152484#comment-14152484 ] Jason Dere commented on HIVE-8094: -- Ah, didn't realize SHOW DATABASES/TABLES also supported LIKE. So yeah I guess that part should be ok then. Does getFunctionNamesByLikePattern() provide a superset of the functionality in getFunctionNames()? If so, then maybe showFunctions should just use getFunctionNamesByLikePattern() rather than having different behavior with/without the LIKE keyword. LIKE appears to be just a decorative keyword in the case of SHOW DATABASES/TABLES. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14152494#comment-14152494 ] peter liu commented on HIVE-8094: - The idea to leave getFunctionNames(String String funcPatternStr) as is and add a new method getFunctionNamesByLikePattern(String String funcPatternStr), is following Thejas's suggestion above to keep the backwards compatibility :) add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14150663#comment-14150663 ] Hive QA commented on HIVE-8094: --- {color:green}Overall{color}: +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12671527/HIVE-8094.3.patch {color:green}SUCCESS:{color} +1 6360 tests passed Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1014/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1014/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-1014/ Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. ATTACHMENT ID: 12671527 add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14150808#comment-14150808 ] peter liu commented on HIVE-8094: - here is the code review link: https://reviews.apache.org/r/26117/ add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch, HIVE-8094.3.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14148578#comment-14148578 ] Navis commented on HIVE-8094: - [~thejas] There was an old issue making FunctionRegistry to be an per session instance, HIVE-2573, which was abandoned more than two year ago. When multiple users register functions with same name, bad things happen. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14148618#comment-14148618 ] Thejas M Nair commented on HIVE-8094: - As the saying goes. Apple has an App for that, Navis has a Patch for that! :) add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14143525#comment-14143525 ] Jason Dere commented on HIVE-8094: -- Hey Thejas, yeah I think you're right about your comment about FunctionRegistry.mFunctions and HS2. So all users would be able to see the temp functions that have been created in HS2. I suspect you may not be able to use them however, if the jar has not been added to the session's classloader then the actual MR tasks may not be able to resolve UDF classes. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14143683#comment-14143683 ] Thejas M Nair commented on HIVE-8094: - bq. One question is we don't need to be backward compatible to all the negative cases, do we? I agree, we don't think we need to care about that. Created HIVE-8218 to track the issue of shared function registry across users. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14143712#comment-14143712 ] Thejas M Nair commented on HIVE-8094: - [~peter_liu] When you look at keeping backward compatibility, one approach to consider is distinguishing the two syntaxes in the AST that HiveParser.g produces. That way can have two different pattern matching code being invoked based on the syntax used. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14142577#comment-14142577 ] Thejas M Nair commented on HIVE-8094: - [~peter_liu], Thanks for working on this ! It would be great to support the same LIKE semantics as one used with show tables and databases. A few comments # We should avoid breaking backward compatibility as far as possible. This patch seems to makes some of the earlier regexes invalid (please correct me if I am wrong). In this case since we are introducing a new keyword, we have the opportunity to make this change without breaking backward compability. ie, we could use the like style regex only when LIKE keyword is used. We can then document the old syntax without LIKE as deprecated. Lets keep the existing test statements for the old syntax around. # Now that we have permanent udfs, the getFunctions calls results in metastore api calls. We should make calls to this api from outside/before the loop. Please create a reviewboard link when you upload a new patch. (reviews.apache.org). add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14142578#comment-14142578 ] Thejas M Nair commented on HIVE-8094: - [~jdere] I have a related question. FunctionRegistry.mFunctions is static. Won't that mean that in HS2 case, all users will have same set of valid udfs ? ([~navis] I believe you have also looked at few issues regarding HS2 and udfs). add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14142890#comment-14142890 ] peter liu commented on HIVE-8094: - [~thejas] Thanks for the comments. 1. I will make sure all the positive cases to be backward compatible. One question is we don't need to be backward compatible to all the negative cases, do we? For example SHOW FUNCTIONS '***' doesn't show anything before, but it will show all the functions after my change. 2. I will move getFunctions call out of the loop. 3. The reason I replaced FunctionRegistry.mFunctions with getFunctions call is that in HS2 case I can't get the permanent UDFs with SHOW FUNCTIONS [regex] but SHOW FUNCTIONS works, so I guess they are probably not contained in static FunctionRegistry.mFunctions add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14142080#comment-14142080 ] peter liu commented on HIVE-8094: - [~thejas] for review add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14141737#comment-14141737 ] Hive QA commented on HIVE-8094: --- {color:green}Overall{color}: +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12670024/HIVE-8094.2.patch {color:green}SUCCESS:{color} +1 6298 tests passed Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/886/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/886/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-886/ Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. ATTACHMENT ID: 12670024 add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch, HIVE-8094.2.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135674#comment-14135674 ] Hive QA commented on HIVE-8094: --- {color:red}Overall{color}: -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12668887/HIVE-8094.1.patch {color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 6276 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_delete_where_partitioned {noformat} Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/821/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/821/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-821/ Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 1 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12668887 add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14134609#comment-14134609 ] peter liu commented on HIVE-8094: - Thanks, Thejas. I attached the patch, would you please kindly review it? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.14.0, 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 Attachments: HIVE-8094.1.patch It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14133100#comment-14133100 ] peter liu commented on HIVE-8094: - I'm working on it, can we assign it to me? add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.13.1 Reporter: peter liu Fix For: 0.14.0 It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-8094) add LIKE keyword support for SHOW FUNCTIONS
[ https://issues.apache.org/jira/browse/HIVE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14133120#comment-14133120 ] Thejas M Nair commented on HIVE-8094: - I have added you to the contributors list in jira. In future you will be able to assign yourself bugs that you are working. add LIKE keyword support for SHOW FUNCTIONS --- Key: HIVE-8094 URL: https://issues.apache.org/jira/browse/HIVE-8094 Project: Hive Issue Type: Improvement Affects Versions: 0.13.1 Reporter: peter liu Assignee: peter liu Fix For: 0.14.0 It would be nice to add LIKE keyword support for SHOW FUNCTIONS as below, and keep the patterns consistent to the way as SHOW DATABASES, SHOW TABLES. bq. SHOW FUNCTIONS LIKE 'foo*'; -- This message was sent by Atlassian JIRA (v6.3.4#6332)