Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle empty object field #2209

Closed
wants to merge 1 commit into from
Closed

handle empty object field #2209

wants to merge 1 commit into from

Conversation

luhhujbb
Copy link
Contributor

@luhhujbb luhhujbb commented Dec 5, 2019

In some indexes mapping, I've some field with this structure:

"myEmptyObjectField": {
"type": "object"
}

Since mapping is dynamic on these indexes, and object is empty elasticsearch cannot guess a type for sub fields, so it has "object" type. (ie empty object).

Because presto row type need at least one field, I just add a condition to drop the field, so that index is queryable.

@cla-bot
Copy link

cla-bot bot commented Dec 5, 2019

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jean-BaPtiste Besselat.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@martint
Copy link
Member

martint commented Dec 5, 2019

Thanks for fixing this! Can you add a test to TestElasticsearchIntegrationSmokeTest?

@luhhujbb
Copy link
Contributor Author

luhhujbb commented Dec 6, 2019

Because of the bad commit signature, I will create a new pull request, with test.

@luhhujbb luhhujbb closed this Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants