mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
[ES|QL] improve test case generator script (#190441)
## Summary Fixes a bug I introduced in https://github.com/elastic/kibana/pull/189941 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
da1db2cdeb
commit
bb2cc70a3b
3 changed files with 234 additions and 2 deletions
|
@ -21,8 +21,8 @@ import {
|
|||
SupportedDataType,
|
||||
FunctionDefinition,
|
||||
dataTypes,
|
||||
isSupportedDataType,
|
||||
fieldTypes,
|
||||
isFieldType,
|
||||
} from '../src/definitions/types';
|
||||
import { FUNCTION_DESCRIBE_BLOCK_NAME } from '../src/validation/function_describe_block_name';
|
||||
import { getMaxMinNumberOfParams } from '../src/validation/helpers';
|
||||
|
@ -1110,7 +1110,7 @@ function getFieldMapping(
|
|||
|
||||
return params.map(({ name: _name, type, constantOnly, literalOptions, ...rest }) => {
|
||||
const typeString: string = type as string;
|
||||
if (isSupportedDataType(typeString)) {
|
||||
if (isFieldType(typeString)) {
|
||||
if (useLiterals && literalOptions) {
|
||||
return {
|
||||
name: `"${literalOptions[0]}"`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue