You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by nonstop-qfchen <gi...@git.apache.org> on 2015/10/29 16:12:14 UTC
[GitHub] incubator-trafodion pull request: Fix JIRA1556
GitHub user nonstop-qfchen opened a pull request:
https://github.com/apache/incubator-trafodion/pull/152
Fix JIRA1556
This fix contains the following code changes.
1. The sample table for native tables can be created partitioned.
2. Reduce the amount of data per partition (via CQD HIST_SCRATCH_VOL_THRESHOLD) to 10240000 bytes.
3. Allow SALT clause in CREATE TABLE LIKE stmt
4. Add a method to retrieve a list of columns (first 2 now) for use with the SALT clause, even if the table does not have a clustering key.
The remaining work (to be reported in a separate JIRA) is to create a partitioned salted table with the CREATE TABLE LIKE cause even though the source table is not partitioned.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nonstop-qfchen/incubator-trafodion MDAMfix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/152.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #152
----
commit 298ddd42b938c687585b820135bdaf6ee0144244
Author: Qifan Chen <qf...@dev02.trafodion.org>
Date: 2015-10-29T14:50:58Z
fix JIRA-1556
commit 0b3c70684b6520778ede920b701402f79f6655a4
Author: Qifan Chen <qf...@dev02.trafodion.org>
Date: 2015-10-29T14:51:11Z
Merge remote branch 'github/master' into MDAMfix
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix JIRA1556
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/152
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix JIRA1556
Posted by nonstop-qfchen <gi...@git.apache.org>.
Github user nonstop-qfchen commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/152#discussion_r43414673
--- Diff: core/sql/optimizer/NAColumn.cpp ---
@@ -838,3 +838,27 @@ Int32 NAColumnArray::getColumnPosition(NAColumn& nc) const
return -1;
}
+NAString NAColumnArray::getColumnNamesAsString(char separator) const
+{
+ return getColumnNamesAsString(separator, entries());
+}
+
+NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
+{
+ NAString nmList;
+
+ if ( ct == 0 )
+ return NAString();
+
+ if ( ct > entries() )
+ ct = entries();
+
+ for (CollIndex i = 0; i < ct-1; i++)
+ {
+ nmList += at(i)->getColName();
--- End diff --
The rework has been submitted.
On Thu, Oct 29, 2015 at 11:36 AM, Qifan Chen <qi...@esgyn.com> wrote:
> Good point. Will wrap getColName() with ToAnsiIdentifier().
>
> See
>
> const NAType *Assign::synthesizeType()
> {
> ValueId targetId, sourceId;
> const NAType * result = doSynthesizeType(targetId, sourceId);
> if (result == NULL)
> {
> emitDyadicTypeSQLnameMsg(-4039,
> targetId.getType(),
> sourceId.getType(),
>
> ToAnsiIdentifier(targetId.getNAColumn()->getColName()));
> return NULL;
> }
> //
> // Return the result.
> //
> return result;
> }
>
>
> On Thu, Oct 29, 2015 at 10:50 AM, DaveBirdsall <no...@github.com>
> wrote:
>
>> In core/sql/optimizer/NAColumn.cpp
>> <https://github.com/apache/incubator-trafodion/pull/152#discussion_r43403344>
>> :
>>
>> > + return getColumnNamesAsString(separator, entries());
>> > +}
>> > +
>> > +NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
>> > +{
>> > + NAString nmList;
>> > +
>> > + if ( ct == 0 )
>> > + return NAString();
>> > +
>> > + if ( ct > entries() )
>> > + ct = entries();
>> > +
>> > + for (CollIndex i = 0; i < ct-1; i++)
>> > + {
>> > + nmList += at(i)->getColName();
>>
>> Are there any oddities to consider when using delimited identifiers?
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/apache/incubator-trafodion/pull/152/files#r43403344>.
>>
>
>
>
> --
> Regards, --Qifan
>
>
--
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix JIRA1556
Posted by nonstop-qfchen <gi...@git.apache.org>.
Github user nonstop-qfchen commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/152#discussion_r43409981
--- Diff: core/sql/optimizer/NAColumn.cpp ---
@@ -838,3 +838,27 @@ Int32 NAColumnArray::getColumnPosition(NAColumn& nc) const
return -1;
}
+NAString NAColumnArray::getColumnNamesAsString(char separator) const
+{
+ return getColumnNamesAsString(separator, entries());
+}
+
+NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
+{
+ NAString nmList;
+
+ if ( ct == 0 )
+ return NAString();
+
+ if ( ct > entries() )
+ ct = entries();
+
+ for (CollIndex i = 0; i < ct-1; i++)
+ {
+ nmList += at(i)->getColName();
--- End diff --
Good point. Will wrap getColName() with ToAnsiIdentifier().
See
const NAType *Assign::synthesizeType()
{
ValueId targetId, sourceId;
const NAType * result = doSynthesizeType(targetId, sourceId);
if (result == NULL)
{
emitDyadicTypeSQLnameMsg(-4039,
targetId.getType(),
sourceId.getType(),
ToAnsiIdentifier(targetId.getNAColumn()->getColName()));
return NULL;
}
//
// Return the result.
//
return result;
}
On Thu, Oct 29, 2015 at 10:50 AM, DaveBirdsall <no...@github.com>
wrote:
> In core/sql/optimizer/NAColumn.cpp
> <https://github.com/apache/incubator-trafodion/pull/152#discussion_r43403344>
> :
>
> > + return getColumnNamesAsString(separator, entries());
> > +}
> > +
> > +NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
> > +{
> > + NAString nmList;
> > +
> > + if ( ct == 0 )
> > + return NAString();
> > +
> > + if ( ct > entries() )
> > + ct = entries();
> > +
> > + for (CollIndex i = 0; i < ct-1; i++)
> > + {
> > + nmList += at(i)->getColName();
>
> Are there any oddities to consider when using delimited identifiers?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/incubator-trafodion/pull/152/files#r43403344>.
>
--
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix JIRA1556
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/152#discussion_r43403476
--- Diff: core/sql/optimizer/NAColumn.cpp ---
@@ -838,3 +838,27 @@ Int32 NAColumnArray::getColumnPosition(NAColumn& nc) const
return -1;
}
+NAString NAColumnArray::getColumnNamesAsString(char separator) const
+{
+ return getColumnNamesAsString(separator, entries());
+}
+
+NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
+{
--- End diff --
I wonder how SHOWDDL lists column names in the PARTITIONING KEY clause?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix JIRA1556
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/152#discussion_r43403344
--- Diff: core/sql/optimizer/NAColumn.cpp ---
@@ -838,3 +838,27 @@ Int32 NAColumnArray::getColumnPosition(NAColumn& nc) const
return -1;
}
+NAString NAColumnArray::getColumnNamesAsString(char separator) const
+{
+ return getColumnNamesAsString(separator, entries());
+}
+
+NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) const
+{
+ NAString nmList;
+
+ if ( ct == 0 )
+ return NAString();
+
+ if ( ct > entries() )
+ ct = entries();
+
+ for (CollIndex i = 0; i < ct-1; i++)
+ {
+ nmList += at(i)->getColName();
--- End diff --
Are there any oddities to consider when using delimited identifiers?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---