You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2014/08/27 00:14:39 UTC
[1/3] git commit: HOWTO: Update JIRA cases following release
Repository: incubator-optiq
Updated Branches:
refs/heads/master c4b0c7b3d -> c87a7b83c
HOWTO: Update JIRA cases following release
Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/88b7a4a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/88b7a4a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/88b7a4a8
Branch: refs/heads/master
Commit: 88b7a4a8a99872e37dfb8699e09d298f9e0a48e3
Parents: c4b0c7b
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Aug 25 12:26:10 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Aug 25 12:26:10 2014 -0700
----------------------------------------------------------------------
doc/HOWTO.md | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/88b7a4a8/doc/HOWTO.md
----------------------------------------------------------------------
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index 3b30bad..a4c7a23 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -307,6 +307,11 @@ Before you start:
* Make sure build and tests succeed, including with
-Doptiq.test.db={mysql,hsqldb}, -Doptiq.test.slow=true,
-Doptiq.test.mongodb=true, -Doptiq.test.splunk=true.
+* Make sure that
+ <a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20OPTIQ%20AND%20status%20%3D%20Resolved">
+ every "resolved" JIRA case</a> (including duplicates) has
+ a fix version assigned (most likely the version we are
+ just about to release)
```bash
# Set passphrase variable without putting it into shell history
@@ -417,3 +422,14 @@ function checkHash() {
checkHash optiq-x.y.z-incubating
```
+
+## Publishing a releae (for Optiq committers)
+
+After a successful release vote, we need to push the release
+out to mirrors, and other tasks.
+
+* In JIRA, search for all issues resolved in this release,
+ and do a bulk update changing their status to "Closed",
+ with a change comment
+ "Resolved in release X.Y.Z-incubating (YYYY-MM-DD)"
+ (fill in release number and date appropriately).
[3/3] git commit: [OPTIQ-388] Handle semi-joins in field trimmer
Posted by jh...@apache.org.
[OPTIQ-388] Handle semi-joins in field trimmer
Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/c87a7b83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/c87a7b83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/c87a7b83
Branch: refs/heads/master
Commit: c87a7b83c03f86691f2d591e89940c35748e431a
Parents: d241cc8
Author: Harish Butani <hb...@hortonworks.com>
Authored: Tue Aug 26 14:01:52 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Aug 26 14:36:47 2014 -0700
----------------------------------------------------------------------
.../org/eigenbase/sql2rel/RelFieldTrimmer.java | 25 ++++++++-
.../org/eigenbase/test/RelOptRulesTest.java | 58 ++++++++++++++++++++
.../org/eigenbase/test/RelOptRulesTest.xml | 44 +++++++++++++++
3 files changed, 124 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/c87a7b83/core/src/main/java/org/eigenbase/sql2rel/RelFieldTrimmer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/sql2rel/RelFieldTrimmer.java b/core/src/main/java/org/eigenbase/sql2rel/RelFieldTrimmer.java
index 078bd03..e5e929e 100644
--- a/core/src/main/java/org/eigenbase/sql2rel/RelFieldTrimmer.java
+++ b/core/src/main/java/org/eigenbase/sql2rel/RelFieldTrimmer.java
@@ -21,6 +21,7 @@ import java.util.*;
import org.eigenbase.rel.*;
import org.eigenbase.rel.rules.RemoveTrivialProjectRule;
+import org.eigenbase.rel.rules.SemiJoinRel;
import org.eigenbase.relopt.*;
import org.eigenbase.reltype.*;
import org.eigenbase.rex.*;
@@ -459,11 +460,13 @@ public class RelFieldTrimmer implements ReflectiveVisitor {
* {@link JoinRel}.
*/
public TrimResult trimFields(
- JoinRel join,
+ JoinRelBase join,
BitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
final RelDataType rowType = join.getRowType();
- final int fieldCount = rowType.getFieldCount();
+ final int fieldCount = join.getSystemFieldList().size()
+ + join.getLeft().getRowType().getFieldCount()
+ + join.getRight().getRowType().getFieldCount();
final RexNode conditionExpr = join.getCondition();
final int systemFieldCount = join.getSystemFieldList().size();
@@ -572,10 +575,26 @@ public class RelFieldTrimmer implements ReflectiveVisitor {
RexNode newConditionExpr =
conditionExpr.accept(shuttle);
- final JoinRel newJoin =
+ final JoinRelBase newJoin =
join.copy(join.getTraitSet(), newConditionExpr, newInputs.get(0),
newInputs.get(1), join.getJoinType(), join.isSemiJoinDone());
+ // For SemiJoins only map fields from the left-side
+ if (newJoin instanceof SemiJoinRel) {
+ Mapping inputMapping = inputMappings.get(0);
+ mapping = Mappings.create(MappingType.INVERSE_SURJECTION,
+ join.getRowType().getFieldCount(),
+ newSystemFieldCount + inputMapping.getTargetCount());
+ for (int i = 0; i < newSystemFieldCount; ++i) {
+ mapping.set(i, i);
+ }
+ offset = systemFieldCount;
+ newOffset = newSystemFieldCount;
+ for (IntPair pair : inputMapping) {
+ mapping.set(pair.source + offset, pair.target + newOffset);
+ }
+ }
+
return new TrimResult(newJoin, mapping);
}
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/c87a7b83/core/src/test/java/org/eigenbase/test/RelOptRulesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/eigenbase/test/RelOptRulesTest.java b/core/src/test/java/org/eigenbase/test/RelOptRulesTest.java
index db33f10..4e97fb5 100644
--- a/core/src/test/java/org/eigenbase/test/RelOptRulesTest.java
+++ b/core/src/test/java/org/eigenbase/test/RelOptRulesTest.java
@@ -61,7 +61,11 @@ import org.eigenbase.relopt.hep.HepProgram;
import org.eigenbase.relopt.hep.HepProgramBuilder;
import org.eigenbase.reltype.RelDataType;
import org.eigenbase.reltype.RelDataTypeFactory;
+import org.eigenbase.sql.SqlNode;
import org.eigenbase.sql.type.SqlTypeName;
+import org.eigenbase.sql.validate.SqlValidator;
+import org.eigenbase.sql2rel.SqlToRelConverter;
+import org.eigenbase.util.Util;
import net.hydromatic.optiq.prepare.Prepare;
@@ -177,6 +181,60 @@ public class RelOptRulesTest extends RelOptTestBase {
+ " and emp.sal > 100)");
}
+ protected void semiJoinTrim() {
+
+ final DiffRepository diffRepos = getDiffRepos();
+ String sql = diffRepos.expand(null, "${sql}");
+
+ TesterImpl t = (TesterImpl) tester;
+ final RelDataTypeFactory typeFactory = t.getTypeFactory();
+ final Prepare.CatalogReader catalogReader =
+ t.createCatalogReader(typeFactory);
+ final SqlValidator validator =
+ t.createValidator(
+ catalogReader, typeFactory);
+ final SqlToRelConverter converter =
+ t.createSqlToRelConverter(
+ validator,
+ catalogReader,
+ typeFactory);
+
+ final SqlNode sqlQuery;
+ try {
+ sqlQuery = t.parseQuery(sql);
+ } catch (Exception e) {
+ throw Util.newInternal(e);
+ }
+
+ final SqlNode validatedQuery = validator.validate(sqlQuery);
+ RelNode rel =
+ converter.convertQuery(validatedQuery, false, true);
+ rel = converter.decorrelate(sqlQuery, rel);
+
+ final HepProgram program =
+ HepProgram.builder()
+ .addRuleInstance(PushFilterPastProjectRule.INSTANCE)
+ .addRuleInstance(PushFilterPastJoinRule.FILTER_ON_JOIN)
+ .addRuleInstance(MergeProjectRule.INSTANCE)
+ .addRuleInstance(SemiJoinRule.INSTANCE)
+ .build();
+
+ HepPlanner planner = new HepPlanner(program);
+ planner.setRoot(rel);
+ rel = planner.findBestExp();
+
+ String planBefore = NL + RelOptUtil.toString(rel);
+ diffRepos.assertEquals("planBefore", "${planBefore}", planBefore);
+ converter.setTrimUnusedFields(true);
+ rel = converter.trimUnusedFields(rel);
+ String planAfter = NL + RelOptUtil.toString(rel);
+ diffRepos.assertEquals("planAfter", "${planAfter}", planAfter);
+ }
+
+ @Test public void testSemiJoinTrim() {
+ semiJoinTrim();
+ }
+
@Test public void testReduceAverage() {
checkPlanning(
ReduceAggregatesRule.INSTANCE,
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/c87a7b83/core/src/test/resources/org/eigenbase/test/RelOptRulesTest.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/eigenbase/test/RelOptRulesTest.xml b/core/src/test/resources/org/eigenbase/test/RelOptRulesTest.xml
index 564a16b..0232bf9 100644
--- a/core/src/test/resources/org/eigenbase/test/RelOptRulesTest.xml
+++ b/core/src/test/resources/org/eigenbase/test/RelOptRulesTest.xml
@@ -2089,4 +2089,48 @@ SemiJoinRel(condition=[=($0, $2)], joinType=[inner])
]]>
</Resource>
</TestCase>
+ <TestCase name="testSemiJoinTrim">
+ <Resource name="sql">
+ <![CDATA[select s.deptno from (select * from dept where exists (
+ select * from emp
+ where emp.deptno = dept.deptno
+ and emp.sal > 100)) s join customer.account on s.deptno = account.acctno]]>
+ </Resource>
+ <Resource name="planBefore">
+ <![CDATA[
+ProjectRel(DEPTNO=[$0])
+ JoinRel(condition=[=($0, $2)], joinType=[inner])
+ SemiJoinRel(condition=[=($0, $2)], joinType=[inner])
+ TableAccessRel(table=[[CATALOG, SALES, DEPT]])
+ ProjectRel($f01=[$9], $f0=[true])
+ JoinRel(condition=[=($7, $9)], joinType=[inner])
+ FilterRel(condition=[>($5, 100)])
+ TableAccessRel(table=[[CATALOG, SALES, EMP]])
+ AggregateRel(group=[{0}])
+ ProjectRel($f0=[$0])
+ TableAccessRel(table=[[CATALOG, SALES, DEPT]])
+ TableAccessRel(table=[[CATALOG, CUSTOMER, ACCOUNT]])
+]]>
+ </Resource>
+ <Resource name="planAfter">
+ <![CDATA[
+ProjectRel(DEPTNO=[$0])
+ JoinRel(condition=[=($0, $1)], joinType=[inner])
+ SemiJoinRel(condition=[=($0, $1)], joinType=[inner])
+ ProjectRel(DEPTNO=[$0])
+ TableAccessRel(table=[[CATALOG, SALES, DEPT]])
+ ProjectRel($f01=[$2])
+ JoinRel(condition=[=($1, $2)], joinType=[inner])
+ FilterRel(condition=[>($0, 100)])
+ ProjectRel(SAL=[$5], DEPTNO=[$7])
+ TableAccessRel(table=[[CATALOG, SALES, EMP]])
+ AggregateRel(group=[{0}])
+ ProjectRel($f0=[$0])
+ ProjectRel(DEPTNO=[$0])
+ TableAccessRel(table=[[CATALOG, SALES, DEPT]])
+ ProjectRel(ACCTNO=[$0])
+ TableAccessRel(table=[[CATALOG, CUSTOMER, ACCOUNT]])
+]]>
+ </Resource>
+ </TestCase>
</Root>
[2/3] git commit: HOWTO: Template emails for Apache votes
Posted by jh...@apache.org.
HOWTO: Template emails for Apache votes
Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/d241cc8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/d241cc8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/d241cc8e
Branch: refs/heads/master
Commit: d241cc8ea414b37583dfad2f45595a3494a08e58
Parents: 88b7a4a
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Aug 25 12:43:52 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Aug 25 12:43:52 2014 -0700
----------------------------------------------------------------------
doc/HOWTO.md | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 126 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/d241cc8e/doc/HOWTO.md
----------------------------------------------------------------------
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index a4c7a23..2d0e8f5 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -423,7 +423,132 @@ checkHash optiq-x.y.z-incubating
```
-## Publishing a releae (for Optiq committers)
+## Get approval for a release via Apache voting process (for Optiq committers)
+
+Release vote on dev list
+
+```
+To: dev@optiq.incubator.apache.org
+Subject: Release Optiq-X.Y.Z-incubating (release candidate N)
+
+Hi all,
+
+I have created a build for Apache Optiq X.Y.Z-incubating, release candidate N.
+
+Thanks to everyone who has contributed to this release.
+
+The commit to be voted upon:
+http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/NNNNNN
+
+The artifacts to be voted on are located here:
+http://people.apache.org/~jhyde/optiq-X.Y.Z-incubating-rcN/
+
+A staged Maven repository is available for review at:
+https://repository.apache.org/content/repositories/orgapacheoptiq-NNNN
+
+Release artifacts are signed with the following key:
+https://people.apache.org/keys/committer/jhyde.asc
+
+Please vote on releasing this package as Apache Optiq X.Y.Z-incubating.
+
+The vote is open for the next 72 hours and passes if a majority of
+at least three +1 PPMC votes are cast.
+
+[ ] +1 Release this package as Apache Optiq X.Y.Z-incubating
+[ ] 0 I don't feel strongly about it, but I'm okay with the release
+[ ] -1 Do not release this package because...
+
+
+Here is my vote:
+
++1 (binding)
+
+Julian
+```
+
+After vote finishes, send out the result:
+
+```
+Subject: [RESULT] [VOTE] Release Optiq-X.Y.Z-incubating (release candidate N)
+To: dev@optiq.incubator.apache.org
+
+Thanks to everyone who has tested the release candidate and given
+their comments and votes.
+
+The tally is as follows.
+
+N binding +1s:
+<names>
+
+N non-binding +1s:
+<names>
+
+No 0s or -1s.
+
+Therefore I am delighted to announce that the proposal to release
+Apache Optiq X.Y.Z-incubating has passed.
+
+I'll now start a vote on the general list. Those of you in the IPMC,
+please recast your vote on the new thread.
+
+Julian
+```
+
+Propose a vote on the incubator list.
+
+```
+To: general@incubator.apache.org
+Subject: [VOTE] Release Apache Optiq X.Y.Z (incubating)
+
+Hi all,
+
+The Optiq community has voted on and approved a proposal to release
+Apache Optiq X.Y.Z (incubating).
+
+Pursuant to the Releases section of the Incubation Policy and with
+the endorsement of NNN of our mentors we would now like to request
+the permission of the Incubator PMC to publish the release. The vote
+is open for 72 hours, or until the necessary number of votes (3 +1)
+is reached.
+
+[ ] +1 Release this package as Apache Optiq X.Y.Z incubating
+[ ] -1 Do not release this package because ...
+
+Apache Optiq PPMC
+
+
+Proposal:
+http://mail-archives.apache.org/mod_mbox/incubator-optiq-dev/201408.mbox/MESSAGE-URI
+
+Vote result:
+N binding +1 votes
+N non-binding +1 votes
+No -1 votes
+http://mail-archives.apache.org/mod_mbox/incubator-optiq-dev/201408.mbox/MESSAGE-URI
+
+Artifacts:
+http://people.apache.org/~jhyde/optiq-X.Y.Z-incubating-rcN/
+
+```
+
+After vote finishes, send out the result:
+
+```
+To: general@incubator.apache.org
+Subject: [RESULT] [VOTE] Release Apache Optiq X.Y.Z (incubating)
+
+This vote passes with N +1s and no 0 or -1 votes:
++1 <name> (mentor)
+
+There was some feedback during voting. I shall open a separate
+thread to discuss.
+
+Thanks everyone. We’ll now roll the release out to the mirrors.
+
+Julian
+```
+
+## Publishing a release (for Optiq committers)
After a successful release vote, we need to push the release
out to mirrors, and other tasks.