laglangyue commented on issue #2405:
URL: 
https://github.com/apache/incubator-seatunnel/issues/2405#issuecomment-1214171866

   > > > Because the schema of fake source connector is defined in code:
   > > > 
![image](https://user-images.githubusercontent.com/51053924/184496770-9ec4dd90-2b65-4688-a79a-1f758835f387.png)
   > > > So the data source should like the following:
   > > > ```
   > > > name age timestamp
   > > > 
   > > > xiaoming 23 xxxxxxxxx
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > You try to use sql plugin to tranform data, but your sql has some 
problems, `decimal` not contained in data source. You can change your sql as 
the follwing:
   > > > ```sql
   > > > select name,age from fake
   > > > ```
   > > 
   > > 
   > > yes, but I modify this in local.
   > > ```java
   > >   @Override
   > >     public SeaTunnelRowType getProducedType() {
   > >         return new SeaTunnelRowType(
   > >             new String[]{"name", "age", "timestamp", "decimal"},
   > >             new SeaTunnelDataType<?>[]{BasicType.STRING_TYPE, 
BasicType.INT_TYPE, BasicType.LONG_TYPE, new DecimalType(38, 18)});
   > >     }
   > > ```
   > 
   > `decimal` is a token in sql language, you can change this key's name and 
try again. By the way, do you change the code in `FakeSourceReader` ?
   > 
   > 
![image](https://user-images.githubusercontent.com/51053924/184497588-dd81dcf8-d5d5-4226-afe7-01b3ccb52e02.png)
   
   yes I do it , and I submit a PR to optimize the fake connector, This 
exception is when seatunnel type is converted to sparktype。
   In my PR,if the transform sql contained the column  `c_decimal` , the 
expection happended. if not ,it's ok.
   https://github.com/apache/incubator-seatunnel/pull/2406/files
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to