Commit 8eb9c956 by ashutoshm

ATLAS-2134: Code Improvements.

parent 1dc7f549
......@@ -175,7 +175,7 @@ public class ZipSource implements EntityImportStream {
currentPosition++;
return getEntityWithExtInfo(this.iterator.next());
} catch (AtlasBaseException e) {
e.printStackTrace();
LOG.error("getNextEntityWithExtInfo", e);
return null;
}
}
......
......@@ -284,6 +284,8 @@ case class GraphPersistenceStrategy1(g: AtlasGraph[_,_]) extends GraphPersistenc
case DataTypes.TypeCategory.TRAIT =>
throw new UnsupportedOperationException(s"load for ${aInfo.dataType()} not supported")
case DataTypes.TypeCategory.CLASS => loadStructAttribute(dataType, aInfo, i, v)
case DataTypes.TypeCategory.RELATIONSHIP =>
throw new UnsupportedOperationException(s"load for ${aInfo.dataType()} not supported")
}
}
......
......@@ -233,6 +233,7 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
def querySrc: Parser[Expression] = rep1sep(singleQrySrc, opt(COMMA)) ^^ { l => l match {
case h :: Nil => h
case h :: t => t.foldLeft(h)(merge(_, _))
case Nil => null
}
}
......@@ -361,6 +362,8 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
case h :: t => { //the left-most part of the identifier (h) can be
t.foldLeft(id(h).asInstanceOf[Expression])(_.field(_))
}
case Nil => null
}
}
......
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