Yash Anand created FLINK-38070:
----------------------------------
Summary: Release Testing: Verify FLIP-507 : Add Model DDL methods
in TABLE API
Key: FLINK-38070
URL: https://issues.apache.org/jira/browse/FLINK-38070
Project: Flink
Issue Type: Sub-task
Reporter: Yash Anand
h3. Follow up the test for https://issues.apache.org/jira/browse/FLINK-37548
Switch to 2.1 release branch and build source with
{code:java}
./mvnw clean install -Pfast -DskipTests -Dscala-2.12 {code}
2. Start cluster with
{code:java}
build-target/bin/start-cluster.sh{code}
3.
Create Table API Java project
Include 2.1 SNAPSHOT table API version in the project
4.
Create Schema and Model descriptor object
private static final Schema SCHEMA =
Schema.newBuilder().column("f0", DataTypes.INT()).build();
private static final ModelDescriptor MODEL_DESCRIPTOR =
ModelDescriptor.forProvider("TestProvider")
.option("a", "Test")
.inputSchema(SCHEMA)
.outputSchema(SCHEMA)
.build();
Create Model
tableEnv.createModel(modelPath, MODEL_DESCRIPTOR, false);
tableEnv.createModel(modelPath, MODEL_DESCRIPTOR, true);
Create Temporary Model
tableEnv.createTemporaryModel(modelPath, MODEL_DESCRIPTOR, false);
createTemporaryModel(modelPath, MODEL_DESCRIPTOR, true);
DROP Model
tableEnv.dropModel(modelPath);
tableEnv.dropModel(modelPath, false);
DROP Temporary Model
tableEnv.dropTemporaryModel(modelPath);
List Models
String[] models = tableEnv.listModels();
5.
Submit the project jar job on local flink cluster
build-target/bin/flink run -c <your.package.YourMainClass> <path_to_jar>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)