You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by su...@apache.org on 2017/01/05 19:29:23 UTC
incubator-atlas git commit: ATLAS-1277 Add feather use 'order by ' in
the DSL search (zhangqiang2 via sumasai)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 6e5863e86 -> 03857baa6
ATLAS-1277 Add feather use 'order by ' in the DSL search (zhangqiang2 via sumasai)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/03857baa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/03857baa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/03857baa
Branch: refs/heads/master
Commit: 03857baa6a895147ce2cdffb214bf77b3f72704b
Parents: 6e5863e
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Thu Jan 5 11:29:16 2017 -0800
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Thu Jan 5 11:29:16 2017 -0800
----------------------------------------------------------------------
release-log.txt | 1 +
.../src/main/scala/org/apache/atlas/query/QueryParser.scala | 4 +++-
.../src/test/scala/org/apache/atlas/query/ParserTest.scala | 4 ++++
3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/03857baa/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 87e8332..a2a2b45 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
+ATLAS-1277 Add feather use 'order by ' in the DSL search (zhangqiang2 via sumasai)
ATLAS-1379 Avoid object query overhead when report query selects class type alias (guptaneeru via dkantor)
ATLAS-1419 update entity-update API impl to preserve value of entity attribute when no value is provided
ATLAS-1346 Search API to return empty list/container object instead of exception (apoorvnaik via mneethiraj)
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/03857baa/repository/src/main/scala/org/apache/atlas/query/QueryParser.scala
----------------------------------------------------------------------
diff --git a/repository/src/main/scala/org/apache/atlas/query/QueryParser.scala b/repository/src/main/scala/org/apache/atlas/query/QueryParser.scala
index 233a3e8..42d76c8 100755
--- a/repository/src/main/scala/org/apache/atlas/query/QueryParser.scala
+++ b/repository/src/main/scala/org/apache/atlas/query/QueryParser.scala
@@ -73,6 +73,8 @@ trait QueryKeywords {
protected val MAX = Keyword("max")
protected val MIN = Keyword("min")
protected val SUM = Keyword("sum")
+ protected val BY = Keyword("by")
+ protected val ORDER = Keyword("order")
}
trait ExpressionUtils {
@@ -270,7 +272,7 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
def fromSrc = identifier ~ AS ~ alias ^^ { case s ~ a ~ al => s.as(al)} |
identifier
- def orderby = ORDERBY ~ expr ~ opt (asce) ^^ {
+ def orderby = (ORDERBY|(ORDER ~ BY )) ~ expr ~ opt (asce) ^^ {
case o ~ odr ~ None => (odr, true)
case o ~ odr ~ asc => (odr, asc.get)
}
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/03857baa/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
----------------------------------------------------------------------
diff --git a/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala b/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
index 8f277fc..878b0e3 100755
--- a/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
@@ -92,4 +92,8 @@ class ParserTest extends BaseTest {
)
}
+ @Test def testorder_by: Unit = {
+ println(QueryParser.apply("from DB order by columnA").right.get.toString)
+ }
+
}