Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/900#discussion_r94516660
--- Diff: core/sql/executor/hiveHook.cpp ---
@@ -468,7 +468,8 @@ struct hive_skey_desc* populateSortCols(HiveMetaData
*md, Int32 sdID,
"populateSortCols::sortCols:],###"))
return NULL;
-
+ if ((foundE - pos)<=10) //this is important to avoid major performance
impact when looking for non existent Order(col over and over, parsing to the
end of string. hot spot flagged using gprof
--- End diff --
Would be good to add a comment here that we are testing for the string
sortCols:[], which happens to be 10 characters long. Or, better to use
strlen("sortCols:[]").
---
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 [email protected] or file a JIRA ticket
with INFRA.
---