Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/703#discussion_r79058570 --- Diff: core/sql/optimizer/SynthType.cpp --- @@ -1010,7 +1010,81 @@ const NAType *BuiltinFunction::synthesizeType() SQLChar(maxLength, typ1.supportsSQLnull()); } break; + + case ITM_ISIPV4: + case ITM_ISIPV6: + { + // type cast any params + ValueId vid1 = child(0)->getValueId(); + SQLChar c1(ComSqlId::MAX_QUERY_ID_LEN); + vid1.coerceType(c1, NA_CHARACTER_TYPE); + //input type must be string + const NAType &typ1 = child(0)->getValueId().getType(); + + if (typ1.getTypeQualifier() != NA_CHARACTER_TYPE) + { + *CmpCommon::diags() << DgSqlCode(-4045) << DgString0("IS_IP"); + return NULL; + } + retType = new HEAP + SQLSmall(TRUE, FALSE); --- End diff -- Oh, sorry. I was confused; I was thinking of the inet_ATON function. But this is the ISIPV4 and V6 function. I agree: SQLSmall is a good choice here. You could even use SQLTiny if you wanted to perhaps.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---