In this example, the signal is one-dimensional (1D).
Input
id1 | timestep | value1 |
---|---|---|
1 | 1 | 1 |
2 | 1 | 2 |
2 | 2 | 3 |
3 | 1 | 4 |
3 | 2 | 5 |
3 | 3 | 6 |
3 | 4 | 7 |
SQL Call
CREATE MULTISET TABLE fft_output_1 AS ( SELECT * FROM FFT ( ON fft_input AS InputTable PARTITION BY id1 ORDER BY timestep USING TargetColumns ('value1') ) AS dt ) WITH DATA;
Output
The first row represents the input sequence of length one. Its FFT is the single value in the sequence (1).
The second and third rows represent the input sequence of length two. Its FFT has only real values.
The final four rows represent the input sequence of length four. Its FFT has conjugal symmetry.
SELECT * FROM fft_output_1;
id_0 timestep real_value1 imag_value1 ---- -------- ------------------- ----------- 3 3 -2.0 0.0 3 2 -2.0 2.0 3 4 -1.9999999999999998 -2.0 3 1 22.0 0.0 1 1 1.0 0.0 2 2 -1.0 0.0 2 1 5.0 0.0
Download a zip file of all examples and a SQL script file that creates their input tables.