[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757308#comment-13757308 ] Edward Capriolo commented on HIVE-5203: --- Would you mind writing some standard junit tests on this one? > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757325#comment-13757325 ] Jason Dere commented on HIVE-5203: -- I have a test case in the main varchar patch, but it won't work here since that type doesn't exist yet. Unfortunately with the compatibility behavior between the existing types, I don't think we can actually hit a situation where we'll run into this issue with the current types. The closest we'd be able to get would be if Date and Timestamp were implicitly convertable to one another, and they are not. Otherwise, the best we can do at the moment is testing that the existing tests in TestFunctionRegistry still work fine. > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757532#comment-13757532 ] Hive QA commented on HIVE-5203: --- {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/12601280/HIVE-5203.1.patch {color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 2909 tests executed *Failed tests:* {noformat} org.apache.hcatalog.mapreduce.TestHCatExternalPartitioned.testHCatPartitionedTable {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/603/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/603/console Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests failed with: TestsFailedException: 1 tests failed {noformat} This message is automatically generated. > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757544#comment-13757544 ] Ashutosh Chauhan commented on HIVE-5203: Jason's rationale for this change and subsequent explanation sounds reasonable to me. +1 > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757837#comment-13757837 ] Edward Capriolo commented on HIVE-5203: --- I have a couple more things I think we should do first. {code} for (Method m: udfMethods) { +currentScore = 0; +List argumentsAccepted = +TypeInfoUtils.getParameterTypeInfos(m, argumentsPassed.size()); +Iterator argsPassedIter = argumentsPassed.iterator(); {code} Especially this one. We are addign a public method we should have tests around it to document its functionality. java doc would be nice to. {code} public static PrimitiveGrouping getPrimitiveGrouping(PrimitiveCategory primitiveCategory) { +switch (primitiveCategory) { {public} > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758102#comment-13758102 ] Jason Dere commented on HIVE-5203: -- Hi Edward, did you have a particular comment around the first code section you highlighted in your previous comment? It looks like your comments were directed against the 2nd code section. {code} for (Method m: udfMethods) { +currentScore = 0; +List argumentsAccepted = +TypeInfoUtils.getParameterTypeInfos(m, argumentsPassed.size()); +Iterator argsPassedIter = argumentsPassed.iterator(); {code} > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758157#comment-13758157 ] Edward Capriolo commented on HIVE-5203: --- I was thinking you could use mock up a class with a few methods with signatures you are looking to hit. {code} MyTestClass { eval(String) eval(Text) eval(int) } {code} Then use that code in a test case and maybe use mockito to show that the logic is finding the method you want. Really as long as it continues to work the same way (current tests) we know it is correct, but it would be nice to have a more direct way to show how this logic works (with a unit test). Just a thought. > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758326#comment-13758326 ] Jason Dere commented on HIVE-5203: -- Managed to add some tests by moving the new functionality to a separate method, though we'd never hit those scenarios in real life. Also posted the changes at https://reviews.facebook.net/D12711 > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758528#comment-13758528 ] Hive QA commented on HIVE-5203: --- {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/12601464/HIVE-5203.2.patch {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 2911 tests executed *Failed tests:* {noformat} org.apache.hcatalog.pig.TestHCatLoader.testGetInputBytes org.apache.hcatalog.pig.TestHCatLoader.testReadPartitionedBasic org.apache.hcatalog.pig.TestHCatLoader.testProjectionsBasic org.apache.hcatalog.mapreduce.TestHCatExternalDynamicPartitioned.testHCatDynamicPartitionedTableMultipleTask {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/616/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/616/console Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests failed with: TestsFailedException: 4 tests failed {noformat} This message is automatically generated. > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758554#comment-13758554 ] Jason Dere commented on HIVE-5203: -- Ran both TestHCatLoader and TestHCatExternalDynamicPartitioned locally and these tests pass for me. > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758613#comment-13758613 ] Edward Capriolo commented on HIVE-5203: --- Cool looks good +1 > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13759998#comment-13759998 ] Hudson commented on HIVE-5203: -- FAILURE: Integrated in Hive-trunk-h0.21 #2313 (See [https://builds.apache.org/job/Hive-trunk-h0.21/2313/]) HIVE-5203 : FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types (Jason Dere via Ashutosh Chauhan) (hashutosh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1520413) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java * /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorUtils.java > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760117#comment-13760117 ] Hudson commented on HIVE-5203: -- FAILURE: Integrated in Hive-trunk-hadoop2 #408 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/408/]) HIVE-5203 : FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types (Jason Dere via Ashutosh Chauhan) (hashutosh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1520413) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java * /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorUtils.java > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760200#comment-13760200 ] Hudson commented on HIVE-5203: -- FAILURE: Integrated in Hive-trunk-hadoop1-ptest #152 (See [https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/152/]) HIVE-5203 : FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types (Jason Dere via Ashutosh Chauhan) (hashutosh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1520413) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java * /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorUtils.java > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-5203) FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types
[ https://issues.apache.org/jira/browse/HIVE-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760883#comment-13760883 ] Hudson commented on HIVE-5203: -- FAILURE: Integrated in Hive-trunk-hadoop2-ptest #85 (See [https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/85/]) HIVE-5203 : FunctionRegistry.getMethodInternal() should prefer method arguments with closer affinity to the original argument types (Jason Dere via Ashutosh Chauhan) (hashutosh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1520413) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java * /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorUtils.java > FunctionRegistry.getMethodInternal() should prefer method arguments with > closer affinity to the original argument types > --- > > Key: HIVE-5203 > URL: https://issues.apache.org/jira/browse/HIVE-5203 > Project: Hive > Issue Type: Bug > Components: Types, UDF >Reporter: Jason Dere >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-5203.1.patch, HIVE-5203.2.patch > > > When the function registry is trying to determine the best version of UDF > evaluate() to use based on a set of arguments passed in, it should prefer > methods where the argument types are more related to the original types. For > example if varchar is used with UDFFromUnixTime(), varchar is convertible to > both the double and string versions of evaluate() for that UDF. In this case > we would prefer that the function registry select the string version over the > double version, since varchar and string are both string types. > This doesn't really affect any of the existing types, but comes into play > with the addition of the varchar type (HIVE-4844). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira