HuangXingBo opened a new pull request #11374: [FLINK-16524][python] Optimize the result of FlattenRowCoder and ArrowCoder to generator to eliminate unnecessary function calls URL: https://github.com/apache/flink/pull/11374 ## What is the purpose of the change *This pull request will optimize the result of FlattenRowCoder and ArrowCoder to generator to eliminate unnecessary function calls* ## Brief change log - *Add CustomLengthPrefixCoderImpl and CustomLengthPrefixCoder* - *Change the result of FlattenRowCoder and ArrowCoder to generator* - *Change the func of Operations to map* ## Verifying this change This change added tests and can be verified as follows: - *It is performance improvement feature, so current test is enough* ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) ## How does this patch test ### Test Code @udf(input_types=[DataTypes.INT(False)], result_type=DataTypes.INT(False)) def inc(x): return x t_env.register_function("inc", inc) # num_rows = 100000000 num_rows = 100000 num_columns = 10 select_list = ["inc(c%s)" % i for i in range(num_columns)] t_env.register_table_sink( "sink", PrintTableSink( ["c%s" % i for i in range(num_columns)], [DataTypes.INT(False)] * num_columns)) t_env.from_table_source(MultiRowColumnTableSource(num_rows, num_columns)) \ .select(','.join(select_list)) \ .insert_into("sink") beg_time = time.time() t_env.execute("perf_test") print("consume time: " + str(time.time() - beg_time)) ## Test Results num rows, num colums | Consume Time(Before) | Consume Time(After) 10kw,1 | 711s | 441s 10kw,10 | 1454s | 1221s
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
