quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shix...@apache.org
Subject incubator-quickstep git commit: QUICKSTEP-20: added parser support for window aggregation functions
Date Wed, 15 Jun 2016 18:08:31 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/SQL-window-aggregation 3bcdd91e7 -> cf0412e8f


QUICKSTEP-20: added parser support for window aggregation functions


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

Branch: refs/heads/SQL-window-aggregation
Commit: cf0412e8fa911623349d61665499ef2ffc43197d
Parents: 3bcdd91
Author: shixuan <shixuan.fan@wisc.edu>
Authored: Wed Jun 15 18:01:09 2016 +0000
Committer: shixuan <shixuan.fan@wisc.edu>
Committed: Wed Jun 15 18:01:09 2016 +0000

----------------------------------------------------------------------
 parser/CMakeLists.txt                   | 8 ++++++--
 parser/ParseWindow.hpp                  | 9 ++++++---
 query_optimizer/resolver/CMakeLists.txt | 1 +
 3 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/cf0412e8/parser/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt
index 0896be7..6bfe083 100644
--- a/parser/CMakeLists.txt
+++ b/parser/CMakeLists.txt
@@ -136,6 +136,7 @@ target_link_libraries(quickstep_parser_ParseBasicExpressions
                       quickstep_parser_ParseLiteralValue
                       quickstep_parser_ParseString
                       quickstep_parser_ParseTreeNode
+                      quickstep_parser_ParseWindow
                       quickstep_types_operations_binaryoperations_BinaryOperation
                       quickstep_types_operations_unaryoperations_UnaryOperation
                       quickstep_utility_Macros
@@ -242,6 +243,7 @@ target_link_libraries(quickstep_parser_ParseSelect
                       quickstep_parser_ParseSelectionClause
                       quickstep_parser_ParseTableReference
                       quickstep_parser_ParseTreeNode
+                      quickstep_parser_ParseWindow
                       quickstep_utility_Macros
                       quickstep_utility_PtrList)
 target_link_libraries(quickstep_parser_ParseSelectionClause
@@ -302,10 +304,11 @@ target_link_libraries(quickstep_parser_ParseTreeNode
 target_link_libraries(quickstep_parser_ParserUtil
                       quickstep_utility_SqlError)
 target_link_libraries(quickstep_parser_ParseWindow
-                      quickstep_parser_ParseBasicExpressions
+                      quickstep_parser_ParseExpression
                       quickstep_parser_ParseLiteralValue
                       quickstep_parser_ParseOrderBy
-                      quickstep_parser_ParseTreeNode)
+                      quickstep_parser_ParseTreeNode
+                      quickstep_utility_PtrList)
 target_link_libraries(quickstep_parser_SqlLexer
                       quickstep_parser_ParseJoinedTableReference
                       quickstep_parser_ParseLiteralValue
@@ -344,6 +347,7 @@ target_link_libraries(quickstep_parser_SqlParser
                       quickstep_parser_ParseSubqueryTableReference
                       quickstep_parser_ParseTableReference
                       quickstep_parser_ParserUtil
+                      quickstep_parser_ParseWindow
                       quickstep_storage_StorageBlockInfo
                       quickstep_types_Type
                       quickstep_types_TypeFactory

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/cf0412e8/parser/ParseWindow.hpp
----------------------------------------------------------------------
diff --git a/parser/ParseWindow.hpp b/parser/ParseWindow.hpp
index 8c69370..78a3842 100644
--- a/parser/ParseWindow.hpp
+++ b/parser/ParseWindow.hpp
@@ -18,6 +18,9 @@
 #ifndef QUICKSTEP_PARSER_PARSE_WINDOW_HPP_
 #define QUICKSTEP_PARSER_PARSE_WINDOW_HPP_
 
+#include <string>
+#include <vector>
+
 #include "parser/ParseExpression.hpp"
 #include "parser/ParseLiteralValue.hpp"
 #include "parser/ParseOrderBy.hpp"
@@ -57,7 +60,7 @@ struct ParseFrameInfo : ParseTreeNode {
   std::unique_ptr<ParseLiteralValue> num_preceding;
   std::unique_ptr<ParseLiteralValue> num_following;
 
-protected:
+ protected:
   void getFieldStringItems(
       std::vector<std::string> *inline_field_names,
       std::vector<std::string> *inline_field_values,
@@ -164,7 +167,7 @@ class ParseWindow : public ParseTreeNode {
       inline_field_names->push_back("window_name");
       inline_field_values->push_back(name_->value());
     }
-        
+
     container_child_field_names->push_back("partition_by");
     std::vector<const ParseTreeNode *> partition_by;
     if (partition_by_expressions_ != nullptr) {
@@ -184,7 +187,7 @@ class ParseWindow : public ParseTreeNode {
     container_child_fields->push_back(order_by);
 
     if (frame_info_ != nullptr) {
-      non_container_child_field_names->push_back("frame_info");      
+      non_container_child_field_names->push_back("frame_info");
       non_container_child_fields->push_back(frame_info_.get());
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/cf0412e8/query_optimizer/resolver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/query_optimizer/resolver/CMakeLists.txt b/query_optimizer/resolver/CMakeLists.txt
index 5959879..dc7eac0 100644
--- a/query_optimizer/resolver/CMakeLists.txt
+++ b/query_optimizer/resolver/CMakeLists.txt
@@ -62,6 +62,7 @@ target_link_libraries(quickstep_queryoptimizer_resolver_Resolver
                       quickstep_parser_ParseSubqueryExpression
                       quickstep_parser_ParseSubqueryTableReference
                       quickstep_parser_ParseTableReference
+                      quickstep_parser_ParseWindow
                       quickstep_queryoptimizer_OptimizerContext
                       quickstep_queryoptimizer_Validator
                       quickstep_queryoptimizer_expressions_AggregateFunction


Mime
View raw message