Hi All,
Thanks for this new release, which looks great!
I have found a problem though (see error message below), when running a query like:
for $ee in collection("my-path-to-files") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
This works in version 8.6.7. The problem seems to be [./aspect-values[@sign = "yes"]]: if I change it in [//aspect-values[@sign = "yes"]] it works fine also in 9.0. Any idea? Thanks.
Best, Giuseppe
ERROR MESSAGE
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.0 Java: Oracle Corporation, 1.8.0_151 OS: Mac OS X, x86_64 Stack Trace: java.lang.ClassCastException: org.basex.query.value.item.Dummy cannot be cast to org.basex.query.value.node.DBNode at org.basex.query.expr.path.InvDocTest.get(InvDocTest.java:56) at org.basex.query.expr.path.Path.index(Path.java:692) at org.basex.query.expr.path.Path.optimize(Path.java:174) at org.basex.query.expr.path.Path.optimize(Path.java:180) at org.basex.query.expr.path.Path.compile(Path.java:157) at org.basex.query.expr.gflwor.Where.compile(Where.java:53) at org.basex.query.expr.gflwor.Where.compile(Where.java:1) at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:101) at org.basex.query.scope.MainModule.comp(MainModule.java:83) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:114) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:105) at org.basex.query.QueryContext.compile(QueryContext.java:299) at org.basex.query.QueryProcessor.compile(QueryProcessor.java:79) at org.basex.core.cmd.AQuery.query(AQuery.java:78) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:427) at org.basex.gui.GUI.lambda$4(GUI.java:370) at java.lang.Thread.run(Thread.java:748) Compiling: - pre-evaluate fn:collection([uri]) to document-node() sequence: collection("/Users/mycomputer/Documents/... -> (db:open-pre("documents", 0), ...) - rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes") - rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes") - rewrite descendant-or-self step(s) - apply attribute index for "yes" Optimized Query: for $ee_0 in (db:open-pre("documents", 0), ...) where $ee_0/descendant-or-self::node()/descendant::*:case[(*:aspect-values/@*:sign = "yes")] return $ee_0 Query: for $ee in collection("/Users/mycomputer/Documents/act/03_p-valuesAfterReductionToPerfImp/documents") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/
Hi Giuseppe,
A bug fix is available for the issue you’ve reported [1].
If you don’t want to switch over to the snapshot, you can rewrite your query as follows until 9.0.1 is released:
for $ee in collection("my-path-to-files") where $ee//case/aspect-values/@sign = "yes" return $ee
Hope this helps, thanks for the kudos, Christian
[1] http://files.basex.org/releases/latest/
On Tue, Mar 27, 2018 at 6:49 PM, Giuseppe Celano celano@informatik.uni-leipzig.de wrote:
Hi All,
Thanks for this new release, which looks great!
I have found a problem though (see error message below), when running a query like:
for $ee in collection("my-path-to-files") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
This works in version 8.6.7. The problem seems to be [./aspect-values[@sign = "yes"]]: if I change it in [//aspect-values[@sign = "yes"]] it works fine also in 9.0. Any idea? Thanks.
Best, Giuseppe
ERROR MESSAGE
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.0 Java: Oracle Corporation, 1.8.0_151 OS: Mac OS X, x86_64 Stack Trace: java.lang.ClassCastException: org.basex.query.value.item.Dummy cannot be cast to org.basex.query.value.node.DBNode at org.basex.query.expr.path.InvDocTest.get(InvDocTest.java:56) at org.basex.query.expr.path.Path.index(Path.java:692) at org.basex.query.expr.path.Path.optimize(Path.java:174) at org.basex.query.expr.path.Path.optimize(Path.java:180) at org.basex.query.expr.path.Path.compile(Path.java:157) at org.basex.query.expr.gflwor.Where.compile(Where.java:53) at org.basex.query.expr.gflwor.Where.compile(Where.java:1) at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:101) at org.basex.query.scope.MainModule.comp(MainModule.java:83) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:114) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:105) at org.basex.query.QueryContext.compile(QueryContext.java:299) at org.basex.query.QueryProcessor.compile(QueryProcessor.java:79) at org.basex.core.cmd.AQuery.query(AQuery.java:78) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:427) at org.basex.gui.GUI.lambda$4(GUI.java:370) at java.lang.Thread.run(Thread.java:748) Compiling:
- pre-evaluate fn:collection([uri]) to document-node() sequence: collection("/Users/mycomputer/Documents/... -> (db:open-pre("documents", 0), ...)
- rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes")
- rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes")
- rewrite descendant-or-self step(s)
- apply attribute index for "yes"
Optimized Query: for $ee_0 in (db:open-pre("documents", 0), ...) where $ee_0/descendant-or-self::node()/descendant::*:case[(*:aspect-values/@*:sign = "yes")] return $ee_0 Query: for $ee in collection("/Users/mycomputer/Documents/act/03_p-valuesAfterReductionToPerfImp/documents") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/
Thanks for this quick reply!
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/
On Apr 4, 2018, at 10:58 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Giuseppe,
A bug fix is available for the issue you’ve reported [1].
If you don’t want to switch over to the snapshot, you can rewrite your query as follows until 9.0.1 is released:
for $ee in collection("my-path-to-files") where $ee//case/aspect-values/@sign = "yes" return $ee
Hope this helps, thanks for the kudos, Christian
[1] http://files.basex.org/releases/latest/
On Tue, Mar 27, 2018 at 6:49 PM, Giuseppe Celano celano@informatik.uni-leipzig.de wrote:
Hi All,
Thanks for this new release, which looks great!
I have found a problem though (see error message below), when running a query like:
for $ee in collection("my-path-to-files") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
This works in version 8.6.7. The problem seems to be [./aspect-values[@sign = "yes"]]: if I change it in [//aspect-values[@sign = "yes"]] it works fine also in 9.0. Any idea? Thanks.
Best, Giuseppe
ERROR MESSAGE
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.0 Java: Oracle Corporation, 1.8.0_151 OS: Mac OS X, x86_64 Stack Trace: java.lang.ClassCastException: org.basex.query.value.item.Dummy cannot be cast to org.basex.query.value.node.DBNode at org.basex.query.expr.path.InvDocTest.get(InvDocTest.java:56) at org.basex.query.expr.path.Path.index(Path.java:692) at org.basex.query.expr.path.Path.optimize(Path.java:174) at org.basex.query.expr.path.Path.optimize(Path.java:180) at org.basex.query.expr.path.Path.compile(Path.java:157) at org.basex.query.expr.gflwor.Where.compile(Where.java:53) at org.basex.query.expr.gflwor.Where.compile(Where.java:1) at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:101) at org.basex.query.scope.MainModule.comp(MainModule.java:83) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:114) at org.basex.query.QueryCompiler.compile(QueryCompiler.java:105) at org.basex.query.QueryContext.compile(QueryContext.java:299) at org.basex.query.QueryProcessor.compile(QueryProcessor.java:79) at org.basex.core.cmd.AQuery.query(AQuery.java:78) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:427) at org.basex.gui.GUI.lambda$4(GUI.java:370) at java.lang.Thread.run(Thread.java:748) Compiling:
- pre-evaluate fn:collection([uri]) to document-node() sequence: collection("/Users/mycomputer/Documents/... -> (db:open-pre("documents", 0), ...)
- rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes")
- rewrite cached path to = operator: *:aspect-values -> (*:aspect-values/@*:sign = "yes")
- rewrite descendant-or-self step(s)
- apply attribute index for "yes"
Optimized Query: for $ee_0 in (db:open-pre("documents", 0), ...) where $ee_0/descendant-or-self::node()/descendant::*:case[(*:aspect-values/@*:sign = "yes")] return $ee_0 Query: for $ee in collection("/Users/mycomputer/Documents/act/03_p-valuesAfterReductionToPerfImp/documents") where $ee//case[./aspect-values[@sign = "yes"]] return $ee
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/
basex-talk@mailman.uni-konstanz.de