Skip to content

Web console: fix number of expected functions#13050

Merged
vogievetsky merged 1 commit intoapache:masterfrom
vogievetsky:fix-build-message
Sep 9, 2022
Merged

Web console: fix number of expected functions#13050
vogievetsky merged 1 commit intoapache:masterfrom
vogievetsky:fix-build-message

Conversation

@vogievetsky
Copy link
Copy Markdown
Contributor

Make the log message not say undefined (and rewrite the code so it can not happen again)

// Make sure there are enough functions found
const numFunction = Object.keys(functionDocs).length;
if (numFunction < MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS) {
if (!(MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS <= numFunction)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some weird js quirk? How is this different from the original numFunc < MIN_EXPECTED condition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they behave differently if numFunctions is undefined because all comparisons with undefined are always false:

image

@vogievetsky vogievetsky merged commit d978afc into apache:master Sep 9, 2022
@vogievetsky vogievetsky deleted the fix-build-message branch September 26, 2022 16:54
vogievetsky added a commit to vogievetsky/druid that referenced this pull request Sep 26, 2022
@abhishekagarwal87 abhishekagarwal87 added this to the 24.0.1 milestone Sep 28, 2022
abhishekagarwal87 pushed a commit that referenced this pull request Sep 28, 2022
* fix number of expected functions (#13050)

* default to no compare (#13041)

* quote columns, datasources in auto complete if needed (#13060)

* Web console: better detection for arrays containing objects (#13077)

* better detection for arrays containing objects

* include boolean also

* link to error docs (#13094)

* Web console: correctly escape path based flatten specs (#13105)

* fix path generation

* do escape

* fix replace

* fix replace for good

* append to exisitng callout (#13130)

* better spec conversion with issues (#13136)

* bump version to 24.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants