4paradigm / 4paradigm/OpenMLDB
Fail to run simple expression for constant column in offline
- Langage dominant
- C++
- Étoiles
- 1.7k
- Forks
- 331
- Merge moyen
- 12 j 12 h
- PR mergées (30 j)
- 1
Description
Now we can not run `cut2("100")` in offline and get the following error.
```
Should not handle non-const column for const project node
com._4paradigm.hybridse.sdk.UnsupportedHybridSeException: Should not handle non-const column for const project node
at com._4paradigm.openmldb.batch.nodes.ConstProjectPlan$.$anonfun$gen$3(ConstProjectPlan.scala:59)
at com._4paradigm.openmldb.batch.nodes.ConstProjectPlan$.$anonfun$gen$3$adapted(ConstProjectPlan.scala:44)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
at scala.collection.immutable.Range.foreach(Range.scala:158)
at scala.collection.TraversableLike.map(TraversableLike.scala:237)
at scala.collection.TraversableLike.map$(TraversableLike.scala:230)
at scala.collection.AbstractTraversable.map(Traversable.scala:108)
at com._4paradigm.openmldb.batch.nodes.ConstProjectPlan$.gen(ConstProjectPlan.scala:44)
at com._4paradigm.openmldb.batch.SparkPlanner.visitNode(SparkPlanner.scala:236)
at com._4paradigm.openmldb.batch.SparkPlanner.getSparkOutput(SparkPlanner.scala:225)
at com._4paradigm.openmldb.batch.SparkPlanner.$anonfun$plan$1(SparkPlanner.scala:106)
at com._4paradigm.openmldb.batch.SparkPlanner.withSQLEngine(SparkPlanner.scala:390)
at com._4paradigm.openmldb.batch.SparkPlanner.plan(SparkPlanner.scala:76)
at com._4paradigm.openmldb.batch.api.OpenmldbSession.openmldbSql(OpenmldbSession.scala:168)
at com._4paradigm.openmldb.batch.api.OpenmldbSession.sql(OpenmldbSession.scala:179)
at com._4paradigm.openmldb.batch.end2end.TestLoadExternalUdf.$anonfun$new$1(TestLoadExternalUdf.scala:30)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
at org.scalatest.Transformer.apply(Transformer.scala:22)
at org.scalatest.Transformer.apply(Transformer.scala:20)
at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
at org.scalatest.FunSuite.withFixture(FunSuite.scala:1560)
at org.scalatest.FunSuiteLike.invokeWithFixture$1(FunSuiteLike.scala:184)
at org.scalatest.FunSuiteLike.$anonfun$runTest$1(FunSuiteLike.scala:196)
at org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
at org.scalatest.FunSuiteLike.runTest(FunSuiteLike.scala:196)
at org.scalatest.FunSuiteLike.runTest$(FunSuiteLike.scala:178)
at com._4paradigm.openmldb.batch.SparkTestSuite.org$scalatest$BeforeAndAfter$$super$runTest(SparkTestSuite.scala:23)
at org.scalatest.BeforeAndAfter.runTest(BeforeAndAfter.scala:203)
at org.scalatest.BeforeAndAfter.runTest$(BeforeAndAfter.scala:192)
at com._4paradigm.openmldb.batch.SparkTestSuite.runTest(SparkTestSuite.scala:23)
at org.scalatest.FunSuiteLike.$anonfun$runTests$1(FunSuiteLike.scala:229)
at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:396)
at scala.collection.immutable.List.foreach(List.scala:392)
at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:379)
at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461)
at org.scalatest.FunSuiteLike.runTests(FunSuiteLike.scala:229)
at org.scalatest.FunSuiteLike.runTests$(FunSuiteLike.scala:228)
at org.scalatest.FunSuite.runTests(FunSuite.scala:1560)
at org.scalatest.Suite.run(Suite.scala:1147)
at org.scalatest.Suite.run$(Suite.scala:1129)
at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1560)
at org.scalatest.FunSuiteLike.$anonfun$run$1(FunSuiteLike.scala:233)
at org.scalatest.SuperEngine.runImpl(Engine.scala:521)
at org.scalatest.FunSuiteLike.run(FunSuiteLike.scala:233)
at org.scalatest.FunSuiteLike.run$(FunSuiteLike.scala:232)
at com._4paradigm.openmldb.batch.SparkTestSuite.org$scalatest$BeforeAndAfter$$super$run(SparkTestSuite.scala:23)
at org.scalatest.BeforeAndAfter.run(BeforeAndAfter.scala:258)
at org.scalatest.BeforeAndAfter.run$(BeforeAndAfter.scala:256)
at com._4paradigm.openmldb.batch.SparkTestSuite.run(SparkTestSuite.scala:23)
at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13(Runner.scala:1340)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13$adapted(Runner.scala:1334)
at scala.collection.immutable.List.foreach(List.scala:392)
at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334)
at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24(Runner.scala:1031)
at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24$adapted(Runner.scala:1010)
at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
at org.scalatest.tools.Runner$.run(Runner.scala:850)
at org.scalatest.tools.Runner.run(Runner.scala)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2or3(ScalaTestRunner.java:38)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:25)
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The error occurs in ConstProjectPlan.scala at line 59 when handling a non-const column for a const project node. Start by examining the test case TestLoadExternalUdf.scala line 30 to see the failing expression. Understand the SparkPlanner and ConstProjectPlan logic to see why cut2("100") is misclassified. Run the specific test to reproduce the error and trace through the code to fix the const column detection.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- scala, spark
- Domaine
- databases, machine-learning
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100