SQL Exceptions for Two-Column Partitioning

Invalid example queries for two-column partitioning on column 1 (c1) and column 2 (c2). Each example raises a SQL exception.

Example 1

SELECT * FROM my_tpf( 
  TABLE( SELECT T.x, T.y FROM T )
  OVER( NO PARTITION BY ) )

This example conflicts with the request made by the UDF because the SQL writer does not want the input table partitioned. As a result, the server returns a SQL error.

Example 2

SELECT * FROM my_tpf( 
  TABLE( SELECT T.x, T.y FROM T )
  OVER( PARTITION BY T.x ) )

SELECT * FROM my_tpf( 
  TABLE( SELECT T.x, T.y FROM T )
  OVER( PARTITION BY T.y ) )

In this example the UDF describes to the server that the data is partitioned by columns T.y and T.x, while the SQL writer requests the partitioning on either column T.y or T.x. which conflicts with what the UDF is requesting. As a result, the server returns a SQL error.