tumbling window and db:add in same expression
Saturday, 30 January 2016 · 2 messages
HE
Hondros, Constantine (ELS-AMS)30 Jan 2016 01:13 #
Hello all,
BaseX doesn't seem to like the query below. Any particular reason - it makes sense to me. I'm trying to add items to a DB incrementally to (attempt to) avoid running into out of memory exceptions when cutting a slice of a large DB into a smaller one.
for tumbling window $w in db:open(myDB')//ani:ref-authors/ani:author
start at $s when $s mod 50000 = 1
return
db:add(
'sliceDB',
<index>{$w}</index>,
'somepath.xml'
)Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk at mailman.uni-konstanz.de
Version: BaseX 8.3
Java: Oracle Corporation, 1.8.0_40
OS: Windows 7, amd64
Stack Trace:
java.lang.NullPointerException
at org.basex.query.expr.ParseExpr.checkAllUp(ParseExpr.java:219)
at org.basex.query.expr.ParseExpr.checkNoneUp(ParseExpr.java:203)
at org.basex.query.expr.gflwor.Window.checkUp(Window.java:341)
at org.basex.query.expr.gflwor.GFLWOR.checkUp(GFLWOR.java:791)
at org.basex.query.QueryContext.check(QueryContext.java:265)
at org.basex.query.QueryParser.finish(QueryParser.java:279)
at org.basex.query.QueryParser.parseMain(QueryParser.java:176)
at org.basex.query.QueryContext.parseMain(QueryContext.java:221)
at org.basex.query.QueryProcessor.parse(QueryProcessor.java:56)
at org.basex.core.cmd.AQuery.parse(AQuery.java:144)
at org.basex.core.cmd.AQuery.updating(AQuery.java:158)
at org.basex.core.cmd.AQuery.updating(AQuery.java:288)
at org.basex.gui.GUI.exec(GUI.java:458)
at org.basex.gui.GUI.access$400(GUI.java:43)
at org.basex.gui.GUI$7.run(GUI.java:412)________________________________
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
CG
Christian Grün30 Jan 2016 02:33 #
Hi Constantine,
Thanks for the hint; check out the latest snapshot [1].
Cheers,
Christian
[1] http://files.basex.org/releases/latest/
Quoted text · Constantine (ELS-AMS) · 22 lines
On Sat, Jan 30, 2016 at 1:13 AM, Hondros, Constantine (ELS-AMS) <C.Hondros at elsevier.com> wrote: > Hello all, > > BaseX doesn’t seem to like the query below. Any particular reason – it makes > sense to me. I’m trying to add items to a DB incrementally to (attempt to) > avoid running into out of memory exceptions when cutting a slice of a large > DB into a smaller one. > > for tumbling window $w in db:open(myDB')//ani:ref-authors/ani:author > start at $s when $s mod 50000 = 1 > return > db:add( > 'sliceDB', > <index>{$w}</index>, > 'somepath.xml' > ) > > > Improper use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 8.3
Written for BaseX 8.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery