Created
April 12, 2023 12:05
-
-
Save soin08/5e0038dbefeba9192706e05a78ef3bc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.soin.demo.flink.sqlrunner; | |
import org.apache.flink.table.api.EnvironmentSettings; | |
import org.apache.flink.table.api.TableEnvironment; | |
public class TestRunner { | |
public static void main(String[] args) { | |
EnvironmentSettings settings = EnvironmentSettings | |
.newInstance() | |
.inStreamingMode() | |
.build(); | |
TableEnvironment tEnv = TableEnvironment.create(settings); | |
var sql2 = "select CAST(commissions AS ARRAY<ROW<amount DOUBLE>>) as commissions " + | |
" from (select ARRAY[ROW(123), ROW(234)] commissions);"; | |
tEnv.sqlQuery(sql2).execute().print(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment