[ 
https://issues.apache.org/jira/browse/IGNITE-24336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922578#comment-17922578
 ] 

Ignite TC Bot commented on IGNITE-24336:
----------------------------------------

{panel:title=Branch: [pull/11832/head] Base: [master] : Possible Blockers 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Cache 2{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8287544]]
* IgniteCacheTestSuite2: 
CacheExchangeMessageDuplicatedStateTest.testExchangeMessages - Test has low 
fail rate in base branch 2,4% and is not flaky

{panel}
{panel:title=Branch: [pull/11832/head] Base: [master] : New Tests 
(3)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 
3|https://ci2.ignite.apache.org/viewLog.html?buildId=8286518]]
* {color:#013220}IgniteCalciteTestSuite: 
UserDefinedFunctionsIntegrationTest.testIncorrectTableFunctions - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
UserDefinedFunctionsIntegrationTest.testTableFunctions - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
UserDefinedFunctionsIntegrationTest.testUnregistrableTableFunctions - 
PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8286603&buildTypeId=IgniteTests24Java8_RunAll]

> Calcite. Add support of user-defined table functions.
> -----------------------------------------------------
>
>                 Key: IGNITE-24336
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24336
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladimir Steshin
>            Assignee: Vladimir Steshin
>            Priority: Major
>              Labels: calcite, ignite-2, ise
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We should implement user-defined table functions. They already have an 
> implementation in _Calcite_, _TableFunctionImpl_. And we also have 
> user-defined scalar functions.
> Table functions should be described similarly to the existing configuration 
> of scalar functions, via _CacheConfiguration#setSqlFunctionClasses()_ and 
> annotation _@QuerySqlTableFunction_. Or we might use another annotation. The 
> annotation should describe the returned columns and their data types.
> *Example:*
> {code:java}
> public static final class TableFunctions {
>     @QuerySqlFunction(tableColumnTypes = {Integer.class, String.class}, 
> tableColumnNames = {"INT_COL", "STR_COL"})
>     public static Iterable table_fun(int i) {
>         return Arrays.asList(
>             new Object[]{i, "code_" + i},
>             new Object[]{i * 10, "code_" + (i * 10)}
>         );
>     }
> }
> ignite.getOrCreateCache(new 
> CacheConfiguration("test_cache").setSqlFunctionClasses(TableFunctions.class));
> sql("select STR_COL from TABLE_FUN(1) where INT_COL>1")
> {code}
> Table function implementation must return an _Iterable_ representing table 
> rows. Each its element is an _Object[]_ or an _Iterable_ representing a table 
> row. The number of row elements must match the number of the defined columns. 
> *Known limitations:*
> Only _Calcite_ engine will support table functions first.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to