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

Support function DDL

    XMLWordPrintableJSON

Details

    Description

      Based on create function and table.we can register a udf,udaf,udtf use sql:

      CREATE FUNCTION [IF NOT EXISTS] [catalog_name.db_name.]function_name AS class_name;
      DROP FUNCTION [IF EXISTS] [catalog_name.db_name.]function_name;
      ALTER FUNCTION [IF EXISTS] [catalog_name.db_name.]function_name RENAME TO new_name;
      
      CREATE function 'TOPK' AS 'com.xxxx.aggregate.udaf.distinctUdaf.topk.ITopKUDAF';
      INSERT INTO db_sink SELECT id, TOPK(price, 5, 'DESC') FROM kafka_source GROUP BY id;
      

      This ticket can assume that the function class is already loaded in classpath by users. Advanced syntax like to how to dynamically load udf libraries from external locations can be on a separate ticket.

      Attachments

        Issue Links

          Activity

            People

              ZhenqiuHuang Zhenqiu Huang
              yuemeng yuemeng
              Votes:
              0 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h