The guidelines for implementing Java table operators are similar to the guidelines for implementing C/C++ table operators. For more information, see Table Operators.
From the Java perspective, the input and output streams come preopened and you do not have to close the input or output stream because the end of the function is an implicit close. You can close a stream only once. Also, you do not have to read the entire input stream. If you get End Of Data on the input stream, an exception is thrown.
- ArrayTypeInfo
- ColumnDefinition
- InputInfo
- An extension of ResultSet
- RuntimeContract
- StreamFormat
- UDTBaseInfo
- AMPInfo
- NodeInfo
The core class for Java SQLTABLE parameter style is RuntimeContract. You define a class with a constructor and an iterator method that is used during the row processing. The constructor acts as the contract function.
Java table operators run in the protected mode Java server just like regular Java UDFs. This environment is multithreaded so you must write the user code to be thread safe.
The rows provided to the table operator are buffered for input and output to improve performance.