[jira] [Closed] (FLINK-8567) Maven-shade-plugin can't relocate Scala classes.
[ https://issues.apache.org/jira/browse/FLINK-8567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Fang closed FLINK-8567. Resolution: Fixed > Maven-shade-plugin can't relocate Scala classes. > > > Key: FLINK-8567 > URL: https://issues.apache.org/jira/browse/FLINK-8567 > Project: Flink > Issue Type: Bug > Components: Table API & SQL >Affects Versions: 1.5.0 >Reporter: John Fang >Priority: Major > Fix For: 2.0.0 > > Attachments: exclude_guava.patch > > > Maven-shade-plugin only relocate java classes, but not Scala classes. I try > to decompile flink-table jar, and find those guava path not beed relocated on > those Scala classes. But flink job run normally for all time. Because > flink-dist_${scala.binary.version}.jar contains the google guava and flink > shaded guava at the same time. Why is the google guava still contained int > the flink? > Because we build flink by Maven-assembly-plugin at flink-disk module. The > Assembly Plugin aggregate its all dependencies, includes those dependencies > which are shaded now. If we use the following patch which exclude the Guava, > then the flink-dist_${scala.binary.version}.jar only contains the > flink-shaded-guava, not the google guava. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8567) Maven-shade-plugin can't relocate Scala classes.
[ https://issues.apache.org/jira/browse/FLINK-8567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354883#comment-16354883 ] John Fang commented on FLINK-8567: -- [~Zentol] Thank you. I have made a mistake. > Maven-shade-plugin can't relocate Scala classes. > > > Key: FLINK-8567 > URL: https://issues.apache.org/jira/browse/FLINK-8567 > Project: Flink > Issue Type: Bug > Components: Table API & SQL >Affects Versions: 1.5.0 >Reporter: John Fang >Priority: Major > Fix For: 2.0.0 > > Attachments: exclude_guava.patch > > > Maven-shade-plugin only relocate java classes, but not Scala classes. I try > to decompile flink-table jar, and find those guava path not beed relocated on > those Scala classes. But flink job run normally for all time. Because > flink-dist_${scala.binary.version}.jar contains the google guava and flink > shaded guava at the same time. Why is the google guava still contained int > the flink? > Because we build flink by Maven-assembly-plugin at flink-disk module. The > Assembly Plugin aggregate its all dependencies, includes those dependencies > which are shaded now. If we use the following patch which exclude the Guava, > then the flink-dist_${scala.binary.version}.jar only contains the > flink-shaded-guava, not the google guava. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FLINK-8567) Maven-shade-plugin can't relocate Scala classes.
[ https://issues.apache.org/jira/browse/FLINK-8567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Fang updated FLINK-8567: - Description: Maven-shade-plugin only relocate java classes, but not Scala classes. I try to decompile flink-table jar, and find those guava path not beed relocated on those Scala classes. But flink job run normally for all time. Because flink-dist_${scala.binary.version}.jar contains the google guava and flink shaded guava at the same time. Why is the google guava still contained int the flink? Because we build flink by Maven-assembly-plugin at flink-disk module. The Assembly Plugin aggregate its all dependencies, includes those dependencies which are shaded now. If we use the following patch which exclude the Guava, then the flink-dist_${scala.binary.version}.jar only contains the flink-shaded-guava, not the google guava. was: Maven-shade-plugin only relocate java classes, but not Scala classes. I try to decompile flink-table Jar, and find those guava path not beed relocated on those Scala classes. But flink job run normally for all time. Because flink-dist_${scala.binary.version}.jar contains the google guava and flink shaded guava at the same time. Why is the google guava still contained int the flink? Because we build flink by Maven-assembly-plugin at flink-disk module. The Assembly Plugin aggregate its all dependencies, includes those dependencies which are shaded now. If we use the following patch which exclude the Guava, then the flink-dist_${scala.binary.version}.jar only contains the flink-shaded-guava, not the google guava. > Maven-shade-plugin can't relocate Scala classes. > > > Key: FLINK-8567 > URL: https://issues.apache.org/jira/browse/FLINK-8567 > Project: Flink > Issue Type: Bug > Components: Table API & SQL >Affects Versions: 2.0.0, 1.5.0 >Reporter: John Fang >Priority: Major > Fix For: 2.0.0 > > Attachments: exclude_guava.patch > > > Maven-shade-plugin only relocate java classes, but not Scala classes. I try > to decompile flink-table jar, and find those guava path not beed relocated on > those Scala classes. But flink job run normally for all time. Because > flink-dist_${scala.binary.version}.jar contains the google guava and flink > shaded guava at the same time. Why is the google guava still contained int > the flink? > Because we build flink by Maven-assembly-plugin at flink-disk module. The > Assembly Plugin aggregate its all dependencies, includes those dependencies > which are shaded now. If we use the following patch which exclude the Guava, > then the flink-dist_${scala.binary.version}.jar only contains the > flink-shaded-guava, not the google guava. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (FLINK-8568) flink table's guava classes can't beed relocated by maven-shed-plugin.
John Fang created FLINK-8568: Summary: flink table's guava classes can't beed relocated by maven-shed-plugin. Key: FLINK-8568 URL: https://issues.apache.org/jira/browse/FLINK-8568 Project: Flink Issue Type: Bug Components: Table API & SQL Affects Versions: 2.0.0, 1.5.0 Reporter: John Fang Fix For: 2.0.0 Attachments: exclude_guava.patch Maven-shade-plugin only relocate java classes, but not Scala classes. I try to decompile flink-table Jar, and find those guava path not beed relocated on those Scala classes. But flink job run normally for all time. Because flink-dist_${scala.binary.version}.jar contains the google guava and flink shaded guava at the same time. Why is the google guava still contained int the flink? Because we build flink by Maven-assembly-plugin at flink-disk module. The Assembly Plugin aggregate its all dependencies, includes those dependencies which are shaded now. If we use the following patch which exclude the Guava, then the flink-dist_${scala.binary.version}.jar only contains the flink-shaded-guava, not the google guava. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (FLINK-8567) Maven-shade-plugin can't relocate Scala classes.
John Fang created FLINK-8567: Summary: Maven-shade-plugin can't relocate Scala classes. Key: FLINK-8567 URL: https://issues.apache.org/jira/browse/FLINK-8567 Project: Flink Issue Type: Bug Components: Table API & SQL Affects Versions: 2.0.0, 1.5.0 Reporter: John Fang Fix For: 2.0.0 Attachments: exclude_guava.patch Maven-shade-plugin only relocate java classes, but not Scala classes. I try to decompile flink-table Jar, and find those guava path not beed relocated on those Scala classes. But flink job run normally for all time. Because flink-dist_${scala.binary.version}.jar contains the google guava and flink shaded guava at the same time. Why is the google guava still contained int the flink? Because we build flink by Maven-assembly-plugin at flink-disk module. The Assembly Plugin aggregate its all dependencies, includes those dependencies which are shaded now. If we use the following patch which exclude the Guava, then the flink-dist_${scala.binary.version}.jar only contains the flink-shaded-guava, not the google guava. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FLINK-7833) Flink's Literal(value, SqlTimeTypeInfo) fails to convert Calctie's RexNode
[ https://issues.apache.org/jira/browse/FLINK-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Fang updated FLINK-7833: - Description: {code:java} Caused by: java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to java.util.Date at org.apache.flink.table.expressions.Literal.dateToCalendar(literals.scala:116) at org.apache.flink.table.expressions.Literal.toRexNode(literals.scala:84) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.immutable.List.map(List.scala:296) at org.apache.flink.table.expressions.BinaryComparison.toRexNode(comparison.scala:35) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.pushFilterIntoScan(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.onMatch(PushFilterIntoTableSourceScanRule.scala:60) at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:212) {code} Using the {{RexProgramExtractor.visitLiteral}} will invoke Calcite's {{RexLiteral.getValue}} to generator {{Literal(value, type)}}. If the type is TIME|DATE|TIMESTAMP, then Calcite's return type of {{RexLiteral.getValue}} is {{Calendar}}. After that, the {{Literal(value, type)}} maybe convert {{RexNode}} by invoking {{Literal.toRexNode}}. Then it will invoked the function {{dateToCalendar}}. Thus it will cause the exception. was: {code:java} Caused by: java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to java.util.Date at org.apache.flink.table.expressions.Literal.dateToCalendar(literals.scala:116) at org.apache.flink.table.expressions.Literal.toRexNode(literals.scala:84) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.immutable.List.map(List.scala:296) at org.apache.flink.table.expressions.BinaryComparison.toRexNode(comparison.scala:35) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.pushFilterIntoScan(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.onMatch(PushFilterIntoTableSourceScanRule.scala:60) at org.apache.calcite.plan.volcano.VolcanoRuleCall.o
[jira] [Updated] (FLINK-7833) Flink's Literal(value, SqlTimeTypeInfo) fails to convert Calctie's RexNode
[ https://issues.apache.org/jira/browse/FLINK-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Fang updated FLINK-7833: - Description: {code:java} Caused by: java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to java.util.Date at org.apache.flink.table.expressions.Literal.dateToCalendar(literals.scala:116) at org.apache.flink.table.expressions.Literal.toRexNode(literals.scala:84) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.immutable.List.map(List.scala:296) at org.apache.flink.table.expressions.BinaryComparison.toRexNode(comparison.scala:35) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.pushFilterIntoScan(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.onMatch(PushFilterIntoTableSourceScanRule.scala:60) at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:212) {code} Using the 'RexProgramExtractor.visitLiteral' will invoke Calcite's {{RexLiteral.getValue}} to generator `Literal(value, type)`. If the type is TIME|DATE|TIMESTAMP, then Calcite's return type of `RexLiteral.getValue'` is `Calendar`. After that, the `Literal(value, type)` maybe convert `RexNode` by invoking `Literal.toRexNode`. Then it will invoked the function `dateToCalendar`. Thus it will cause the exception. was: ``` Caused by: java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to java.util.Date at org.apache.flink.table.expressions.Literal.dateToCalendar(literals.scala:116) at org.apache.flink.table.expressions.Literal.toRexNode(literals.scala:84) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.immutable.List.map(List.scala:296) at org.apache.flink.table.expressions.BinaryComparison.toRexNode(comparison.scala:35) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.pushFilterIntoScan(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.onMatch(PushFilterIntoTableSourceScanRule.scala:60) at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.ja
[jira] [Created] (FLINK-7833) Flink's Literal(value, SqlTimeTypeInfo) fails to convert Calctie's RexNode
John Fang created FLINK-7833: Summary: Flink's Literal(value, SqlTimeTypeInfo) fails to convert Calctie's RexNode Key: FLINK-7833 URL: https://issues.apache.org/jira/browse/FLINK-7833 Project: Flink Issue Type: Bug Components: Table API & SQL Reporter: John Fang Fix For: 1.4.0 ``` Caused by: java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to java.util.Date at org.apache.flink.table.expressions.Literal.dateToCalendar(literals.scala:116) at org.apache.flink.table.expressions.Literal.toRexNode(literals.scala:84) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at org.apache.flink.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:35) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.immutable.List.map(List.scala:296) at org.apache.flink.table.expressions.BinaryComparison.toRexNode(comparison.scala:35) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule$$anonfun$1.apply(PushFilterIntoTableSourceScanRule.scala:97) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.pushFilterIntoScan(PushFilterIntoTableSourceScanRule.scala:97) at org.apache.flink.table.plan.rules.logical.PushFilterIntoTableSourceScanRule.onMatch(PushFilterIntoTableSourceScanRule.scala:60) at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:212) ``` Using the `RexProgramExtractor.visitLiteral` will invoke Calcite's `RexLiteral.getValue` to generator `Literal(value, type)`. If the type is TIME|DATE|TIMESTAMP, then Calcite's return type of `RexLiteral.getValue'` is `Calendar`. After that, the `Literal(value, type)` maybe convert `RexNode` by invoking `Literal.toRexNode`. Then it will invoked the function `dateToCalendar`. Thus it will cause the exception. -- This message was sent by Atlassian JIRA (v6.4.14#64029)