Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18539

StreamExecutionEnvironment#addSource(SourceFunction, TypeInformation) doesn't use the user defined type information

    XMLWordPrintableJSON

Details

    Description

      class MySource<T> implements SourceFunction<T>, ResultTypeQueryable<T> {
       TypeInformation getProducedType() {
         return TypeExtractor.createTypeInfo(SourceFunction.class, this.getClass(), 0, null, null);
       } 
      }
      
      DataStream ds = tEnv.addSource(new MySource(), Types.ROW(Types.STRING))
      

      The returned TypeInformation of MySource is GenericTypeInfo, not the user given RowTypeInfo.

      It seems that StreamExecutionEnvironment#getTypeInfo doesn't use the user given typeInfo in the highest priority.

      Attachments

        Issue Links

          Activity

            People

              jark Jark Wu
              jark Jark Wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: