[2/5] phoenix git commit: PHOENIX-1646 Views and functional index expressions may lose information when stringified

2015-02-09 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/abeaa74a/phoenix-core/src/main/java/org/apache/phoenix/parse/OuterJoinParseNode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/parse/OuterJoinParseNode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/parse/OuterJoinParseNode.java
deleted file mode 100644
index 97f636b..000
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/parse/OuterJoinParseNode.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.parse;
-
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.List;
-
-
-
-/**
- * 
- * Node representing an outer join qualifier (+) in SQL
- * TODO: remove Oracle specific syntax
- *
- * 
- * @since 0.1
- */
-public class OuterJoinParseNode extends UnaryParseNode{
-OuterJoinParseNode(ParseNode node) {
-super(node);
-}
-
-@Override
-public T T accept(ParseNodeVisitorT visitor) throws SQLException {
-ListT l = Collections.emptyList();
-if (visitor.visitEnter(this)) {
-l = acceptChildren(visitor);
-}
-return visitor.visitLeave(this, l);
-}
-}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/abeaa74a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNode.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNode.java
index 2ee8a83..b32674e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNode.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNode.java
@@ -20,6 +20,8 @@ package org.apache.phoenix.parse;
 import java.sql.SQLException;
 import java.util.List;
 
+import org.apache.phoenix.compile.ColumnResolver;
+
 
 
 
@@ -47,4 +49,13 @@ public abstract class ParseNode {
 public String getAlias() {
 return null;
 }
+
+@Override
+public final String toString() {
+StringBuilder buf = new StringBuilder();
+toSQL(null, buf);
+return buf.toString();
+}
+
+public abstract void toSQL(ColumnResolver resolver, StringBuilder buf);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/abeaa74a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java 
b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
index c92dbb6..ddfaa03 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
@@ -19,7 +19,6 @@ package org.apache.phoenix.parse;
 
 import java.lang.reflect.Constructor;
 import java.sql.SQLException;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -52,6 +51,7 @@ import org.apache.phoenix.schema.types.PTimestamp;
 import org.apache.phoenix.util.SchemaUtil;
 
 import com.google.common.collect.ListMultimap;
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 /**
@@ -391,12 +391,22 @@ public class ParseNodeFactory {
 public FunctionParseNode function(String name, ListParseNode valueNodes,
 ListParseNode columnNodes, boolean isAscending) {
 
-ListParseNode children = new ArrayListParseNode();
-children.addAll(columnNodes);
-children.add(new LiteralParseNode(Boolean.valueOf(isAscending)));
-children.addAll(valueNodes);
+ListParseNode args = 
Lists.newArrayListWithExpectedSize(columnNodes.size() + valueNodes.size() + 1);
+args.addAll(columnNodes);
+args.add(new LiteralParseNode(Boolean.valueOf(isAscending)));
+args.addAll(valueNodes);
 
-return function(name, children);
+BuiltInFunctionInfo info = getInfo(name, args);
+Constructor? extends FunctionParseNode ctor = info.getNodeCtor();
+if (ctor 

[3/5] phoenix git commit: PHOENIX-1646 Views and functional index expressions may lose information when stringified

2015-02-09 Thread jamestaylor
PHOENIX-1646 Views and functional index expressions may lose information when 
stringified


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/abeaa74a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/abeaa74a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/abeaa74a

Branch: refs/heads/master
Commit: abeaa74ad35e145fcae40f239437e1b5964bcd72
Parents: 2d5913b
Author: James Taylor jtay...@salesforce.com
Authored: Mon Feb 9 16:36:34 2015 -0800
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Feb 9 18:37:14 2015 -0800

--
 .../java/org/apache/phoenix/end2end/ViewIT.java |  27 ++
 .../phoenix/compile/CreateTableCompiler.java|   4 +-
 .../phoenix/compile/ExpressionCompiler.java |  22 +-
 .../expression/ComparisonExpression.java|  12 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |  37 +--
 .../org/apache/phoenix/parse/AddParseNode.java  |   6 +
 .../AggregateFunctionWithinGroupParseNode.java  |  52 +++
 .../org/apache/phoenix/parse/AliasedNode.java   |  35 ++
 .../org/apache/phoenix/parse/AndParseNode.java  |  14 +
 .../phoenix/parse/ArithmeticParseNode.java  |  15 +
 .../parse/ArrayAllAnyComparisonNode.java|  49 +++
 .../phoenix/parse/ArrayAllComparisonNode.java   |   3 +-
 .../phoenix/parse/ArrayAnyComparisonNode.java   |   3 +-
 .../phoenix/parse/ArrayConstructorNode.java |  17 +
 .../apache/phoenix/parse/ArrayElemRefNode.java  |  11 +
 .../apache/phoenix/parse/BetweenParseNode.java  |  18 +-
 .../org/apache/phoenix/parse/BindParseNode.java |  12 +-
 .../org/apache/phoenix/parse/BindTableNode.java |   8 +
 .../org/apache/phoenix/parse/CaseParseNode.java |  20 ++
 .../org/apache/phoenix/parse/CastParseNode.java |  58 ++--
 .../org/apache/phoenix/parse/ColumnDef.java |  26 +-
 .../apache/phoenix/parse/ColumnParseNode.java   |  47 ++-
 .../phoenix/parse/ComparisonParseNode.java  |  10 +
 .../apache/phoenix/parse/CompoundParseNode.java |   5 -
 .../apache/phoenix/parse/ConcreteTableNode.java |  19 ++
 .../apache/phoenix/parse/DerivedTableNode.java  |  27 ++
 .../phoenix/parse/DistinctCountParseNode.java   |  16 +
 .../apache/phoenix/parse/DivideParseNode.java   |   7 +
 .../apache/phoenix/parse/ExistsParseNode.java   |   9 +
 .../phoenix/parse/FamilyWildcardParseNode.java  |   8 +
 .../apache/phoenix/parse/FunctionParseNode.java |  36 ++-
 .../java/org/apache/phoenix/parse/HintNode.java |  36 +++
 .../apache/phoenix/parse/InListParseNode.java   |  19 ++
 .../org/apache/phoenix/parse/InParseNode.java   |  11 +
 .../apache/phoenix/parse/IsNullParseNode.java   |  10 +
 .../org/apache/phoenix/parse/JoinTableNode.java |  51 +++
 .../org/apache/phoenix/parse/LikeParseNode.java |  12 +
 .../org/apache/phoenix/parse/LimitNode.java |  29 ++
 .../apache/phoenix/parse/LiteralParseNode.java  |  28 +-
 .../apache/phoenix/parse/ModulusParseNode.java  |   6 +
 .../apache/phoenix/parse/MultiplyParseNode.java |   6 +
 .../org/apache/phoenix/parse/NamedNode.java |   6 +-
 .../apache/phoenix/parse/NamedParseNode.java|  17 +-
 .../apache/phoenix/parse/NamedTableNode.java|  38 +++
 .../org/apache/phoenix/parse/NotParseNode.java  |   9 +
 .../org/apache/phoenix/parse/OrParseNode.java   |  15 +
 .../org/apache/phoenix/parse/OrderByNode.java   |  34 +-
 .../phoenix/parse/OuterJoinParseNode.java   |  47 ---
 .../org/apache/phoenix/parse/ParseNode.java |  11 +
 .../apache/phoenix/parse/ParseNodeFactory.java  |  34 +-
 .../parse/RowValueConstructorParseNode.java |  16 +
 .../apache/phoenix/parse/SelectStatement.java   |  99 ++
 .../phoenix/parse/SequenceValueParseNode.java   |  10 +
 .../phoenix/parse/StringConcatParseNode.java|  14 +
 .../apache/phoenix/parse/SubqueryParseNode.java |   8 +
 .../apache/phoenix/parse/SubtractParseNode.java |   7 +
 .../org/apache/phoenix/parse/TableName.java |   4 +-
 .../org/apache/phoenix/parse/TableNode.java |  10 +
 .../phoenix/parse/TableWildcardParseNode.java   |   7 +
 .../apache/phoenix/parse/WildcardParseNode.java |  16 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  10 +-
 .../org/apache/phoenix/schema/types/PDate.java  |   5 +-
 .../apache/phoenix/schema/types/PVarchar.java   |   3 +-
 .../java/org/apache/phoenix/util/IndexUtil.java |   7 +-
 .../java/org/apache/phoenix/util/QueryUtil.java |  19 +-
 .../org/apache/phoenix/util/StringUtil.java |   5 +
 .../phoenix/compile/WhereCompilerTest.java  |  84 ++---
 .../phoenix/compile/WhereOptimizerTest.java |   3 +-
 .../apache/phoenix/parse/QueryParserTest.java   | 318 +++
 .../query/BaseConnectionlessQueryTest.java  |  23 ++
 .../phoenix/schema/types/PDataTypeTest.java |   7 +
 71 files changed, 1357 insertions(+), 370 deletions(-)
--



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2015-02-09 Thread Apache Jenkins Server
3.0 branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/phoenix.git

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-3.0-hadoop1/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-3.0-hadoop1/lastCompletedBuild/testReport/

Changes
[mujtaba] Update CHANGES



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: Update CHANGES

2015-02-09 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/3.0 f2eee2fde - be2267441


Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/be226744
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/be226744
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/be226744

Branch: refs/heads/3.0
Commit: be22674418e700f79fd2483902876de141a7c8ba
Parents: f2eee2f
Author: Mujtaba mujt...@apache.org
Authored: Mon Feb 9 15:40:33 2015 -0800
Committer: Mujtaba mujt...@apache.org
Committed: Mon Feb 9 15:40:33 2015 -0800

--
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/be226744/CHANGES
--
diff --git a/CHANGES b/CHANGES
index acdf5e3..3733d35 100644
--- a/CHANGES
+++ b/CHANGES
@@ -78,6 +78,8 @@ Release Notes - Phoenix - Version 3.3
 * [PHOENIX-1591] - Return all rows instead of no rows if IN clause 
subquery gets optimized out from semi-join and returns empty result
 * [PHOENIX-1600] - Scanner is left unclosed in 
MetaDataEndpointImpl#doDropTable()
 * [PHOENIX-1606] - Update JDBC version to match release version
+* [PHOENIX-1610] - Incorrect subquery results caused by unpaired 
contextStack push/pop
+* [PHOENIX-1616] - Creating a View with a case sensitive column name does 
not work
 
 
 Release Notes - Phoenix - Version 3.2