Github user nonstop-qfchen commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/132#discussion_r42544428
--- Diff: core/sql/optimizer/NAFileSet.cpp ---
@@ -161,6 +162,18 @@ Lng32 NAFileSet::getKeyLength()
return keyLength_;
}
+// returns the length of the encoded key in bytes for this index
+Lng32 NAFileSet::getEncodedKeyLength()
+{
+ if(encodedKeyLength_ >0) return encodedKeyLength_;
+
+ for(CollIndex i=0;i<indexKeyColumns_.entries();i++)
+ {
+ encodedKeyLength_ +=
indexKeyColumns_[i]->getType()->getNominalSize();
--- End diff --
Thanks!
On Tue, Oct 20, 2015 at 2:02 PM, Hans Zeller <[email protected]>
wrote:
> In core/sql/optimizer/NAFileSet.cpp
>
<https://github.com/apache/incubator-trafodion/pull/132#discussion_r42538971>
> :
>
> > @@ -161,6 +162,18 @@ Lng32 NAFileSet::getKeyLength()
> > return keyLength_;
> > }
> >
> > +// returns the length of the encoded key in bytes for this index
> > +Lng32 NAFileSet::getEncodedKeyLength()
> > +{
> > + if(encodedKeyLength_ >0) return encodedKeyLength_;
> > +
> > + for(CollIndex i=0;i<indexKeyColumns_.entries();i++)
> > + {
> > + encodedKeyLength_ +=
indexKeyColumns_[i]->getType()->getNominalSize();
>
> What's the reason for not calling the method that already does this,
> NAType::getEncodedKeyLength()?
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/incubator-trafodion/pull/132/files#r42538971>.
>
--
Regards, --Qifan
---
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.
---