asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject [30/50] [abbrv] asterixdb git commit: merge master
Date Mon, 17 Oct 2016 19:55:20 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java
----------------------------------------------------------------------
diff --cc asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java
index a4959ab,cf36c05..f6f0862
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java
@@@ -36,9 -37,9 +37,10 @@@ import org.apache.asterix.optimizer.rul
  import org.apache.asterix.optimizer.rules.ExtractOrderExpressionsRule;
  import org.apache.asterix.optimizer.rules.FeedScanCollectionToUnnest;
  import org.apache.asterix.optimizer.rules.FuzzyEqRule;
- import org.apache.asterix.optimizer.rules.IfElseToSwitchCaseFunctionRule;
+ import org.apache.asterix.optimizer.rules.InjectTypeCastForSwitchCaseRule;
+ import org.apache.asterix.optimizer.rules.InjectTypeCastForUnionRule;
  import org.apache.asterix.optimizer.rules.InlineUnnestFunctionRule;
 +import org.apache.asterix.optimizer.rules.IntervalSplitPartitioningRule;
  import org.apache.asterix.optimizer.rules.IntroduceAutogenerateIDRule;
  import org.apache.asterix.optimizer.rules.IntroduceDynamicTypeCastForExternalFunctionRule;
  import org.apache.asterix.optimizer.rules.IntroduceDynamicTypeCastRule;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
----------------------------------------------------------------------
diff --cc asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index 61057b4,76d0245..294f4d0
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@@ -244,15 -254,11 +255,15 @@@ public class APIFramework 
          OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesExternalSort(sortFrameLimit);
          OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesExternalGroupBy(groupFrameLimit);
          OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesForJoin(joinFrameLimit);
 +        OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesForJoinLeftInput(joinFrameLeftInputLimit);
 +
 +        int intervalMaxDuration = (int) (compilerProperties.getIntervalMaxDuration());
 +        OptimizationConfUtil.getPhysicalOptimizationConfig().getMaxIntervalDuration(intervalMaxDuration);
  
-         HeuristicCompilerFactoryBuilder builder = new HeuristicCompilerFactoryBuilder(
-                 AqlOptimizationContextFactory.INSTANCE);
+         HeuristicCompilerFactoryBuilder builder =
+                 new HeuristicCompilerFactoryBuilder(AqlOptimizationContextFactory.INSTANCE);
          builder.setPhysicalOptimizationConfig(OptimizationConfUtil.getPhysicalOptimizationConfig());
-         builder.setLogicalRewrites(buildDefaultLogicalRewrites());
+         builder.setLogicalRewrites(buildDefaultLogicalRewrites(cExtensionManager));
          builder.setPhysicalRewrites(buildDefaultPhysicalRewrites());
          IDataFormat format = queryMetadataProvider.getFormat();
          ICompilerFactory compilerFactory = builder.create();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java
----------------------------------------------------------------------
diff --cc asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java
index 0a684ed,5bfb5f8..b79c2cb
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java
@@@ -53,27 -45,17 +53,27 @@@ public class AsterixCompilerProperties 
  
      public long getJoinMemorySize() {
          return accessor.getProperty(COMPILER_JOINMEMORY_KEY, COMPILER_JOINMEMORY_DEFAULT,
-                 PropertyInterpreters.getLongPropertyInterpreter());
+                 PropertyInterpreters.getLongBytePropertyInterpreter());
      }
  
 +    public long getJoinLeftInputSize() {
 +        return accessor.getProperty(COMPILER_JOIN_LEFTINPUT_KEY, COMPILER_JOIN_LEFTINPUT_DEFAULT,
 +                PropertyInterpreters.getLongPropertyInterpreter());
 +    }
 +
      public long getGroupMemorySize() {
          return accessor.getProperty(COMPILER_GROUPMEMORY_KEY, COMPILER_GROUPMEMORY_DEFAULT,
-                 PropertyInterpreters.getLongPropertyInterpreter());
+                 PropertyInterpreters.getLongBytePropertyInterpreter());
      }
  
 +    public long getIntervalMaxDuration() {
 +        return accessor.getProperty(COMPILER_INTERVAL_MAXDURATION_KEY, COMPILER_INTERVAL_MAXDURATION_DEFAULT,
 +                PropertyInterpreters.getLongPropertyInterpreter());
 +    }
 +
      public int getFrameSize() {
          return accessor.getProperty(COMPILER_FRAMESIZE_KEY, COMPILER_FRAMESIZE_DEFAULT,
-                 PropertyInterpreters.getIntegerPropertyInterpreter());
+                 PropertyInterpreters.getIntegerBytePropertyInterpreter());
      }
  
      public String getPregelixHome() {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
----------------------------------------------------------------------
diff --cc asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
index 07fab74,2ee70bc..6d86976
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
@@@ -156,10 -151,10 +156,10 @@@ public abstract class RangeMapBuilder 
          int fieldIndex = 0;
          int fieldType = rangeMap.getTag(0, 0);
          AqlBinaryComparatorFactoryProvider comparatorFactory = AqlBinaryComparatorFactoryProvider.INSTANCE;
-         IBinaryComparatorFactory bcf = comparatorFactory
-                 .getBinaryComparatorFactory(ATypeTag.VALUE_TYPE_MAPPING[fieldType], ascending);
+         IBinaryComparatorFactory bcf =
+                 comparatorFactory.getBinaryComparatorFactory(ATypeTag.VALUE_TYPE_MAPPING[fieldType],
ascending);
          IBinaryComparator comparator = bcf.createBinaryComparator();
 -        int c = 0;
 +        int c;
          for (int split = 1; split < rangeMap.getSplitCount(); ++split) {
              if (fieldType != rangeMap.getTag(fieldIndex, split)) {
                  throw new AsterixException("Range field contains more than a single type
of items (" + fieldType

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-om/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryComparatorFactoryProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/asterixdb/asterix-runtime/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/functions/FunctionIdentifier.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/FDsAndEquivClassesVisitor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/IsomorphismVariableMappingVisitor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
----------------------------------------------------------------------
diff --cc hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
index b649b13,fe8e044..214c932
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
@@@ -368,17 -362,9 +363,15 @@@ public class LogicalOperatorPrettyPrint
      }
  
      @Override
-     public String visitRangeForwardOperator(RangeForwardOperator op, Integer indent) throws
AlgebricksException {
-         StringBuilder buffer = new StringBuilder();
-         addIndent(buffer, indent).append("range forward ");
-         return buffer.toString();
++    public Void visitRangeForwardOperator(RangeForwardOperator op, Integer indent) throws
AlgebricksException {
++        addIndent(indent).append("range forward ");
++        return null;
 +    }
 +
 +    @Override
-     public String visitMaterializeOperator(MaterializeOperator op, Integer indent) throws
AlgebricksException {
-         StringBuilder buffer = new StringBuilder();
-         addIndent(buffer, indent).append("materialize ");
-         return buffer.toString();
+     public Void visitMaterializeOperator(MaterializeOperator op, Integer indent) throws
AlgebricksException {
+         addIndent(indent).append("materialize");
+         return null;
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
----------------------------------------------------------------------
diff --cc hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
index 12b9c66,a1b3556..08a6edf
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
@@@ -42,8 -43,10 +43,11 @@@ import org.apache.hyracks.algebricks.co
  import org.apache.hyracks.algebricks.core.algebra.properties.FunctionalDependency;
  import org.apache.hyracks.algebricks.core.algebra.properties.ILogicalPropertiesVector;
  import org.apache.hyracks.algebricks.core.algebra.properties.INodeDomain;
 +import org.apache.hyracks.dataflow.std.base.RangeId;
  
+ /**
+  * The Algebricks default implementation for IOptimizationContext.
+  */
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public class AlgebricksOptimizationContext implements IOptimizationContext {
  
@@@ -97,10 -101,9 +103,10 @@@
      public AlgebricksOptimizationContext(int varCounter, IExpressionEvalSizeComputer expressionEvalSizeComputer,
              IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
              IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer nullableTypeComputer,
-             PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint
clusterLocations,
-             LogicalOperatorPrettyPrintVisitor prettyPrintVisitor) {
+             IConflictingTypeResolver conflictingTypeResovler, PhysicalOptimizationConfig
physicalOptimizationConfig,
+             AlgebricksPartitionConstraint clusterLocations, LogicalOperatorPrettyPrintVisitor
prettyPrintVisitor) {
          this.varCounter = varCounter;
 +        this.rangeIdCounter = -1;
          this.expressionEvalSizeComputer = expressionEvalSizeComputer;
          this.mergeAggregationExpressionFactory = mergeAggregationExpressionFactory;
          this.expressionTypeComputer = expressionTypeComputer;
@@@ -213,10 -209,7 +219,7 @@@
      @Override
      public List<LogicalVariable> findPrimaryKey(LogicalVariable recordVar) {
          FunctionalDependency fd = varToPrimaryKey.get(recordVar);
-         if (fd == null) {
-             return new ArrayList<>();
-         }
-         return new ArrayList<>(fd.getHead());
 -        return fd == null ? null : new ArrayList<>(fd.getHead());
++        return fd == null ? new ArrayList<>() : new ArrayList<>(fd.getHead());
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-data/pom.xml
----------------------------------------------------------------------
diff --cc hyracks-fullstack/algebricks/algebricks-data/pom.xml
index f311fb1,aaf02c1..8502577
--- a/hyracks-fullstack/algebricks/algebricks-data/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-data/pom.xml
@@@ -50,12 -50,7 +50,12 @@@
      <dependency>
        <groupId>org.apache.hyracks</groupId>
        <artifactId>hyracks-data-std</artifactId>
-       <version>0.2.18-SNAPSHOT</version>
+       <version>${project.version}</version>
      </dependency>
 +    <dependency>
 +      <groupId>org.apache.hyracks</groupId>
 +      <artifactId>hyracks-dataflow-common</artifactId>
 +      <version>0.2.18-SNAPSHOT</version>
 +    </dependency>
    </dependencies>
  </project>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
----------------------------------------------------------------------
diff --cc hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
index 5735e9a,d07544b..627fb89
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
@@@ -479,9 -469,9 +475,9 @@@ public class EnforceStructuralPropertie
                  }
                  case LOCAL_GROUPING_PROPERTY: {
                      LocalGroupingProperty g = (LocalGroupingProperty) prop;
-                     Collection<LogicalVariable> vars = (g.getPreferredOrderEnforcer()
!= null)
-                             ? g.getPreferredOrderEnforcer() : g.getColumnSet();
+                     Collection<LogicalVariable> vars =
+                             (g.getPreferredOrderEnforcer() != null) ? g.getPreferredOrderEnforcer()
: g.getColumnSet();
 -                    List<OrderColumn> orderColumns = new ArrayList<OrderColumn>();
 +                    List<OrderColumn> orderColumns = new ArrayList<>();
                      for (LogicalVariable v : vars) {
                          OrderColumn oc = new OrderColumn(v, OrderKind.ASC);
                          orderColumns.add(oc);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetAlgebricksPhysicalOperatorsRule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2e48a78/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
----------------------------------------------------------------------
diff --cc hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
index 79db5a8,08ab78d..0eeddce
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
@@@ -113,13 -113,8 +113,13 @@@
      </dependency>
      <dependency>
        <groupId>org.apache.hyracks</groupId>
 +      <artifactId>hyracks-dataflow-common</artifactId>
 +      <version>0.2.18-SNAPSHOT</version>
 +    </dependency>
 +    <dependency>
 +      <groupId>org.apache.hyracks</groupId>
        <artifactId>hyracks-client</artifactId>
-       <version>0.2.18-SNAPSHOT</version>
+       <version>${project.version}</version>
        <type>jar</type>
        <scope>compile</scope>
      </dependency>


Mime
View raw message