You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/20 11:48:40 UTC

[GitHub] [incubator-seatunnel] hk-lrzy opened a new issue, #2816: [Bug] [FlinkTransform] Flink Transform can't covert BigDeciamlTypeInfo

hk-lrzy opened a new issue, #2816:
URL: https://github.com/apache/incubator-seatunnel/issues/2816

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   Flink sql can't use `BigDecimalTypeInfo`. 
   
   ### SeaTunnel Version
   
   dev-branch
   
   ### SeaTunnel Config
   
   ```conf
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #    http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   ######
   ###### This config file is a demonstration of streaming processing in seatunnel config
   ######
   
   env {
     # You can set flink configuration here
     execution.parallelism = 1
     job.mode = "BATCH"
     execution.planner = "blink"
     #execution.checkpoint.interval = 10000
     #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
   }
   
   source {
     # This is a example source plugin **only for test and demonstrate the feature source plugin**
     FakeSource {
       result_table_name = "fake"
       schema = {
         fields {
           user_id = "bigint",
           date = "date",
           city = "string",
           age = "smallint",
           sex = "smallint",
           price = "decimal(9,2)",
           price_float = "float",
           price_double = "double",
           last_visit_date = "timestamp",
           cost = "bigint",
           max_dwell_time = "int",
           min_dwell_time = "int"
         }
       }
     }
     # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
     # please go to https://seatunnel.apache.org/docs/connector-v2/source/FakeSource
   }
   
   transform {
     sql {
       sql = "select user_id,`date`,city,age,sex ,price,price_float,price_double,last_visit_date,cost,max_dwell_time,min_dwell_time from fake"
     }
   
     # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
     # please go to https://seatunnel.apache.org/docs/transform/sql
   }
   
   sink {
     Console {}
   
     # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
     # please go to https://seatunnel.apache.org/docs/category/sink-v2
   }
   ```
   
   
   ### Running Command
   
   ```shell
   example.
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: org.apache.flink.table.codegen.CodeGenException: Incompatible types of expression and result type. Expression[GeneratedExpression(result$10,isNull$11,,Decimal(9,2),false)] type is [Decimal(9,2)], result type is [GenericType<java.math.BigDecimal>]
   	at org.apache.flink.table.codegen.CodeGenerator$$anonfun$generateResultExpression$2.apply(CodeGenerator.scala:379)
   	at org.apache.flink.table.codegen.CodeGenerator$$anonfun$generateResultExpression$2.apply(CodeGenerator.scala:377)
   	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
   	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
   	at org.apache.flink.table.codegen.CodeGenerator.generateResultExpression(CodeGenerator.scala:377)
   	at org.apache.flink.table.codegen.CodeGenerator.generateConverterResultExpression(CodeGenerator.scala:295)
   	at org.apache.flink.table.plan.nodes.datastream.StreamScan$class.generateConversionProcessFunction(StreamScan.scala:115)
   	at org.apache.flink.table.plan.nodes.datastream.StreamScan$class.convertToInternalRow(StreamScan.scala:74)
   	at org.apache.flink.table.plan.nodes.datastream.DataStreamScan.convertToInternalRow(DataStreamScan.scala:46)
   	at org.apache.flink.table.plan.nodes.datastream.DataStreamScan.translateToPlan(DataStreamScan.scala:90)
   	at org.apache.flink.table.plan.nodes.datastream.DataStreamCalc.translateToPlan(DataStreamCalc.scala:73)
   ```
   ```
   
   
   ### Flink or Spark Version
   
   flink
   
   ### Java or Scala Version
   
   java 1.8
   scala 2.11
   
   ### Screenshots
   
   ![img_v2_3fce8574-d9df-4d55-8e6b-4d44ee0b35bg](https://user-images.githubusercontent.com/14176134/191249774-51e58799-33c3-488a-888c-ccf94bfb5efd.jpg)
   
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 commented on issue #2816: [Bug] [FlinkTransform] Flink Transform can't covert BigDeciamlTypeInfo

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on issue #2816:
URL: https://github.com/apache/incubator-seatunnel/issues/2816#issuecomment-1256849875

   link https://github.com/apache/incubator-seatunnel/issues/2872


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hk-lrzy closed issue #2816: [Bug] [FlinkTransform] Flink Transform can't covert BigDeciamlTypeInfo

Posted by GitBox <gi...@apache.org>.
hk-lrzy closed issue #2816: [Bug] [FlinkTransform] Flink Transform can't covert BigDeciamlTypeInfo
URL: https://github.com/apache/incubator-seatunnel/issues/2816


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org