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

SQL: fix object extraction from sources #37502

Merged
merged 4 commits into from
Jan 18, 2019

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Jan 15, 2019

Throws an exception if hit extractor tries to retrieve unsupported
object. For example, selecting "a" from {"a": {"b": "c"}} now throws
an exception instead of returning null.

Relates to #37364

Throws an exception if hit extractor tries to retrieve unsupported
object. For example, selecting "a" from `{"a": {"b": "c"}}` now throws
an exception instead of returning null.

Relates to elastic#37364
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@imotov
Copy link
Contributor Author

imotov commented Jan 15, 2019

@elasticmachine run elasticsearch-ci-1

Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

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

LGTM. nice catch! Thx!

@matriv
Copy link
Contributor

matriv commented Jan 16, 2019

run the gradle build tests 1

@matriv
Copy link
Contributor

matriv commented Jan 16, 2019

run the gradle build tests 2

1 similar comment
@matriv
Copy link
Contributor

matriv commented Jan 16, 2019

run the gradle build tests 2

@matriv
Copy link
Contributor

matriv commented Jan 16, 2019

run the gradle build tests 1

public void testObjectsForSourceValue() throws IOException {
String fieldName = randomAlphaOfLength(5);
FieldHitExtractor fe = new FieldHitExtractor(fieldName, null, false);
SearchHit hit = new SearchHit(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you choose to call extract(hit) and not follow the approach as here for example: https://github.com/elastic/elasticsearch/pull/37502/files#diff-9aaee9be08445653bba7407b9f2b5ca3R302

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason. Both approaches would work I think. I can replace it if you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, just wanted to check if there was a particular reason.

@imotov
Copy link
Contributor Author

imotov commented Jan 16, 2019

run the gradle build tests 1

1 similar comment
@costin
Copy link
Member

costin commented Jan 16, 2019

run the gradle build tests 1

@imotov
Copy link
Contributor Author

imotov commented Jan 16, 2019

run the gradle build tests 1

@imotov
Copy link
Contributor Author

imotov commented Jan 16, 2019

run the gradle build tests 2

@imotov
Copy link
Contributor Author

imotov commented Jan 17, 2019

run the gradle build tests 1

@pcsanwald pcsanwald removed the v6.6.0 label Jan 17, 2019
@imotov
Copy link
Contributor Author

imotov commented Jan 18, 2019

run the gradle build tests 1

@imotov imotov added v6.6.1 and removed v6.5.5 labels Jan 18, 2019
@imotov imotov merged commit 54af8a4 into elastic:master Jan 18, 2019
imotov added a commit that referenced this pull request Jan 18, 2019
Throws an exception if hit extractor tries to retrieve unsupported
object. For example, selecting "a" from `{"a": {"b": "c"}}` now throws
an exception instead of returning null.

Relates to #37364
imotov added a commit that referenced this pull request Jan 18, 2019
Throws an exception if hit extractor tries to retrieve unsupported
object. For example, selecting "a" from `{"a": {"b": "c"}}` now throws
an exception instead of returning null.

Relates to #37364
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 21, 2019
* elastic/master: (104 commits)
  Permission for restricted indices (elastic#37577)
  Remove Watcher Account "unsecure" settings (elastic#36736)
  Add cache cleaning task for ML snapshot (elastic#37505)
  Update jdk used by the docker builds (elastic#37621)
  Remove an unused constant in PutMappingRequest.
  Update get users to allow unknown fields (elastic#37593)
  Do not add index event listener if CCR disabled (elastic#37432)
  Add local session timeouts to leader node (elastic#37438)
  Add some deprecation optimizations (elastic#37597)
  refactor inner geogrid classes to own class files (elastic#37596)
  Remove obsolete deprecation checks (elastic#37510)
  ML: Add support for single bucket aggs in Datafeeds (elastic#37544)
  ML: creating ML State write alias and pointing writes there (elastic#37483)
  Deprecate types in the put mapping API. (elastic#37280)
  [ILM] Add unfollow action (elastic#36970)
  Packaging: Update marker used to allow ELASTIC_PASSWORD (elastic#37243)
  Fix setting openldap realm ssl config
  Document the need for JAVA11_HOME (elastic#37589)
  SQL: fix object extraction from sources (elastic#37502)
  Nit in settings.gradle for Eclipse
  ...
@imotov imotov deleted the fix-sql-object-extraction branch May 1, 2020 22:10
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.

6 participants