You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add input_dir and lazy_column_list_path option to expression runner (facebookincubator#3231)
Summary:
This patch adds two startup flags to ExpressionRunner:
input_dir: allows it to find required input files in a specified
directory. It searches for files generated by ExpressionVerfier
like input_vector, result_vector, sql, indices_of_lazy_columns
and complex_constants.
lazy_column_list_path: allows it to consume this list of column
indices that represents the columns in the input vector to be wrapped in lazy
Pull Request resolved: facebookincubator#3231
Test Plan:
- Added a unit test for a utility function
- Manually tested
Reviewed By: mbasmanova
Differential Revision: D41293907
Pulled By: bikramSingh91
fbshipit-source-id: 68c287c8d1e261296e3d6169992b1cb8c963542a
Copy file name to clipboardexpand all lines: velox/docs/develop/testing/fuzzer.rst
+17-7
Original file line number
Diff line number
Diff line change
@@ -164,21 +164,27 @@ input vector and expression to files and replay these later.
164
164
165
165
2. Run Expression Runner using generated files.
166
166
167
-
``--repro_persist_path <path/to/directory>`` flag tells the Fuzzer to save
168
-
input vector and expression SQL to files in the specified directory and print
169
-
out the exact paths. Fuzzer uses :doc:`VectorSaver <../debugging/vector-saver>` for storing vectors on disk
170
-
while preserving encodings.
171
-
172
-
ExpressionRunner takes a path to input vector, path to expression SQL and
173
-
"mode" and evaluates the specified expression on the specified data.
167
+
``--repro_persist_path <path/to/directory>`` flag tells the Fuzzer to save the
168
+
input vector, initial result vector, expression SQL, and other relevant data to files in a new directory saved within
169
+
the specified directory. It also prints out the exact paths for these. Fuzzer uses :doc:`VectorSaver <../debugging/vector-saver>`
170
+
for storing vectors on disk while preserving encodings.
171
+
172
+
ExpressionRunner needs at the very least a path to input vector and path to expression SQL to run.
173
+
However, you might need more files to reproduce the issue. All of which will be present in the directory
174
+
that the fuzzer test generated. You can directly point the ExpressionRunner to that directory using --fuzzer_repro_path
175
+
where it will pick up all the files automatically or you can specify each explicitly using other startup flags.
174
176
ExpressionRunner supports the following flags:
175
177
178
+
* ``--fuzzer_repro_path`` directory path where all input files (required to reproduce a failure) that are generated by the Fuzzer are expected to reside. ExpressionRunner will automatically pick up all the files from this folder unless they are explicitly specified via their respective startup flag.
179
+
176
180
* ``--input_path`` path to input vector that was created by the Fuzzer
177
181
178
182
* ``--sql_path`` path to expression SQL that was created by the Fuzzer
179
183
180
184
* ``--complex_constant_path`` optional path to complex constants that aren't accurately expressable in SQL (Array, Map, Structs, ...). This is used with SQL file to reproduce the exact expression, not needed when the expression doesn't contain complex constants.
181
185
186
+
* ``--lazy_column_list_path`` optional path for the file stored on-disk which contains a vector of column indices that specify which columns of the input row vector should be wrapped in lazy. This is used when the failing test included input columns that were lazy vector.
187
+
182
188
* ``--result_path`` optional path to result vector that was created by the Fuzzer. Result vector is used to reproduce cases where Fuzzer passes dirty vectors to expression evaluation as a result buffer. This ensures that functions are implemented correctly, taking into consideration dirty result buffer.
183
189
184
190
* ``--mode`` run mode. One of "verify", "common" (default), "simplified".
@@ -189,8 +195,12 @@ ExpressionRunner supports the following flags:
189
195
190
196
- ``simplified`` evaluates the expression using simplified path and prints the results to stdout.
191
197
198
+
- ``query`` evaluate SQL query specified in --sql or --sql_path and print out results. If --input_path is specified, the query may reference it as table 't'.
199
+
192
200
* ``--num_rows`` optional number of rows to process in common and simplified modes. Default: 10. 0 means all rows. This flag is ignored in 'verify' mode.
193
201
202
+
* ``--store_result_path`` optional directory path for storing the results of evaluating SQL expression or query in 'common', 'simplified' or 'query' modes.
0 commit comments