Commit 03857baa by Suma Shivaprasad

ATLAS-1277 Add feather use 'order by ' in the DSL search (zhangqiang2 via sumasai)

parent 6e5863e8
......@@ -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)
......
......@@ -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)
}
......
......@@ -92,4 +92,8 @@ class ParserTest extends BaseTest {
)
}
@Test def testorder_by: Unit = {
println(QueryParser.apply("from DB order by columnA").right.get.toString)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment