You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Ayub Pathan (JIRA)" <ji...@apache.org> on 2017/04/21 11:27:04 UTC
[jira] [Commented] (ATLAS-1744) Error when searching type with
attribute name "order" , "limit" , "offset"
[ https://issues.apache.org/jira/browse/ATLAS-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978545#comment-15978545 ]
Ayub Pathan commented on ATLAS-1744:
------------------------------------
The above three words (limit, offset and order) are keywords in gremlin select expression. These cannot be used as fields in the assets/types.
https://github.com/apache/incubator-atlas/blob/0.8-incubating/repository/src/main/scala/org/apache/atlas/query/GremlinQuery.scala#L772
{code: java}
object SelectExpressionHelper {
/**
* This method extracts the child select expression from parent expression
*/
def extractSelectExpression(child: Expression): Option[SelectExpression] = {
child match {
case se@SelectExpression(child, selectList, false) =>{
Some(se)
}
case limit@LimitExpression(child, lmt, offset) => {
extractSelectExpression(child)
}
case order@OrderExpression(child, odr, odrBy) => {
extractSelectExpression(child)
}
case path@PathExpression(child) => {
extractSelectExpression(child)
}
case _ => {
None
}
}
}
{code}
These keywords should be documented.
> Error when searching type with attribute name "order" , "limit" , "offset"
> --------------------------------------------------------------------------
>
> Key: ATLAS-1744
> URL: https://issues.apache.org/jira/browse/ATLAS-1744
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Affects Versions: 0.8-incubating, 0.9-incubating
> Reporter: Sharmadha Sainath
> Attachments: OrderSearchError.txt
>
>
> 1.Created a type with attributes "order", "limit", "offset"
> 2.Created an entity for the type.
> 3.Searched
> type where order="random"
> which threw 500 internal server error with error notification
> {code}
> Discovery query failed type_entity where order ="random"
> {code}.
> Same exception when searching type with name "limit" and "offset"
> type where limit="upper"
> type where offset="middle"
> Attached the complete exception stack trace .
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)