You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a from expression has a yield clause followed by an empty group, Morel throws ClassCastException.
Here is an example:
- from e in [1,2,3] yield e group;
java.lang.ClassCastException: net.hydromatic.morel.ast.Core$Id cannot be cast to net.hydromatic.morel.ast.Core$Tuple
at net.hydromatic.morel.compile.Compiler.createRowSinkFactory(Compiler.java:340)
at net.hydromatic.morel.compile.Compiler.createRowSinkFactory(Compiler.java:317)
at net.hydromatic.morel.compile.Compiler.compileFrom(Compiler.java:293)
at net.hydromatic.morel.compile.Compiler.compile(Compiler.java:240)
at net.hydromatic.morel.compile.Compiler.compileArg(Compiler.java:164)
at net.hydromatic.morel.compile.Compiler.lambda$compileValDecl$20(Compiler.java:619)
at net.hydromatic.morel.ast.Core$NonRecValDecl.forEachBinding(Core.java:707)
at net.hydromatic.morel.compile.Compiler.compileValDecl(Compiler.java:614)
at net.hydromatic.morel.compile.Compiler.compileDecl(Compiler.java:501)
at net.hydromatic.morel.compile.Compiler.compileStatement(Compiler.java:88)
at net.hydromatic.morel.compile.Compiles.prepareDecl(Compiles.java:116)
at net.hydromatic.morel.compile.Compiles.prepareStatement(Compiles.java:69)
at net.hydromatic.morel.Shell$SubShell.extracted(Shell.java:480)
at net.hydromatic.morel.Shell.run(Shell.java:264)
at net.hydromatic.morel.Shell.main(Shell.java:88)
A similar query without yield is OK:
- from e in [1,2,3] group;
val it = [()] : unit list
Another query with the problem:
- from e in scott.emp where e.job = "CLERK" yield e.deptno group ;
java.lang.ClassCastException: net.hydromatic.morel.ast.Core$Apply cannot be cast to net.hydromatic.morel.ast.Core$Tuple
at net.hydromatic.morel.compile.Compiler.createRowSinkFactory(Compiler.java:340)
The text was updated successfully, but these errors were encountered:
If a
from
expression has ayield
clause followed by an emptygroup
, Morel throwsClassCastException
.Here is an example:
A similar query without
yield
is OK:Another query with the problem:
The text was updated successfully, but these errors were encountered: