[ https://issues.apache.org/jira/browse/FLINK-23978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703657#comment-17703657 ]
Alexey Novakov commented on FLINK-23978: ---------------------------------------- [~chesnay] This solution requires {code:java} "org.apache.flink" % "flink-streaming-scala_2.12" % flinkVersion{code} to be added in my Flink Scala 2.13 or 3 Job runtime. It feels a little bit strange for a user project to have Scala 3 or 2.13 as a main compile version, but in the same time *flink-streaming-scala* has to be added into project depencies with *"_2.12"* suffix because we need _DefaultScalaProductFieldAccessorFactory_ on the classpath. Although this is just a naming/packaging point, I am wondering if it would it be better to place this single class into a new Flink maven module like "flink-scala-product" or so? > FieldAccessor has direct scala dependency > ----------------------------------------- > > Key: FLINK-23978 > URL: https://issues.apache.org/jira/browse/FLINK-23978 > Project: Flink > Issue Type: Sub-task > Components: API / DataStream > Reporter: Chesnay Schepler > Assignee: Chesnay Schepler > Priority: Major > Labels: pull-request-available > Fix For: 1.15.0 > > > The FieldAccessor class in flink-streaming-java has a hard dependency on > scala. It would be ideal if we could restrict this dependencies to > flink-streaming-scala. > We could move the SimpleProductFieldAccessor & RecursiveProductFieldAccessor > to flink-streaming-scala, and load them in the FieldAccessorFactory via > reflection. > This is one of a few steps that would allow the Java Datastream API to be > used without scala being on the classpath. -- This message was sent by Atlassian Jira (v8.20.10#820010)