sql icon indicating copy to clipboard operation
sql copied to clipboard

[BUG] Test project_source_change_type_env should throw a SemanticCheckException

Open GumpacG opened this issue 2 years ago • 5 comments

What is the bug? The test project_source_change_type_env does not throw a SemanticCheckException.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Run the test project_source_change_type_env in https://github.com/opensearch-project/sql/blob/2.x/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java
  2. See that a SemanticCheckException was expected to be thrown however, nothing was thrown.

What is the expected behavior? The query source=schema | fields integer_value, double_value | fields float_value should throw a SemanticCheckException because the first fields already shrink the typeenv to {interger_value, double_value}

What is your host/environment?

  • OS: macOS
  • Version: OpenSearch 2.4
  • Plugins: OpenSearch SQL 2.x

Do you have any additional context? Test should be enabled once this issue is resolved.

GumpacG avatar Oct 14 '22 17:10 GumpacG

Hello, @GumpacG I would like to contribute.

DevPJ9 avatar Oct 14 '22 18:10 DevPJ9

Hello, @GumpacG I would like to contribute.

@DevPJ9, you are welcome!

Yury-Fridlyand avatar Oct 15 '22 01:10 Yury-Fridlyand

@Yury-Fridlyand can you please assign this to me.

DevPJ9 avatar Oct 15 '22 11:10 DevPJ9

Hello, @Yury-Fridlyand Sorry for the late reply. Can you please guide me through the steps to reproduce the error. I have not worked with "Test". Again, I am sorry for the late reply.

DevPJ9 avatar Oct 20 '22 06:10 DevPJ9

@DevPJ9, You can activate the test https://github.com/opensearch-project/sql/blob/863f751adc315c14ad26ac7756a299170c005588/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java#L391-L393 (delete @Disabled line) and run it

./gradlew :core:test --tests org.opensearch.sql.analysis.AnalyzerTest.project_source_change_type_env

Yury-Fridlyand avatar Oct 20 '22 18:10 Yury-Fridlyand

@DevPJ9 you need any help on this?

dai-chen avatar Dec 14 '22 19:12 dai-chen