-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[HZ-1119] Nested types support #19954
[HZ-1119] Nested types support #19954
Conversation
# Conflicts: # hazelcast-sql/src/main/java/com/hazelcast/sql/impl/calcite/parse/QueryParser.java
# Conflicts: # hazelcast-sql/src/main/java/com/hazelcast/sql/impl/calcite/schema/HazelcastTable.java # hazelcast-sql/src/test/java/com/hazelcast/sql/impl/expression/NestingAndCasingExpressionTest.java
# Conflicts: # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/HazelcastSqlToRelConverter.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/opt/OptUtils.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/schema/HazelcastCalciteCatalogReader.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/schema/HazelcastTable.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/HazelcastSqlOperatorTable.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operand/TypedOperandChecker.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operators/typeinference/JsonFunctionOperandTypeInference.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operators/typeinference/json/HazelcastJsonQueryFunction.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operators/typeinference/json/HazelcastJsonValueFunction.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operators/typeinference/json/HazelcastParseJsonFunction.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/operators/typeinference/json/JsonFunctionUtil.java # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/validate/types/HazelcastJsonType.java # hazelcast/src/main/java/com/hazelcast/sql/impl/SqlDataSerializerHook.java
# Conflicts: # hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/expression/misc/CastFunctionIntegrationTest.java
# Conflicts: # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/connector/SqlConnector.java # hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/connector/kafka/SqlJsonTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First glance over PR
hazelcast/src/main/java/com/hazelcast/jet/impl/util/ReflectionUtils.java
Outdated
Show resolved
Hide resolved
hazelcast/src/main/java/com/hazelcast/sql/impl/client/SqlExecuteMessageTask.java
Outdated
Show resolved
Hide resolved
hazelcast/src/main/java/com/hazelcast/sql/impl/client/SqlFetchMessageTask.java
Outdated
Show resolved
Hide resolved
hazelcast/src/main/java/com/hazelcast/sql/impl/client/SqlExecuteMessageTask.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private boolean isPrimitive(Class<?> clazz) { | ||
return clazz.getPackage().getName().startsWith("java."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a method java.lang.Class#isPrimitive
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, String
is also primitive. It's a sanity check, it should not normally happen. I think we can convert it to an assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not work with Map, List etc. We want to skip those too. Bad name for the method though probably.
hazelcast/src/main/java/com/hazelcast/sql/impl/type/converter/RowConverter.java
Show resolved
Hide resolved
hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/inject/HazelcastObjectUpsertTarget.java
Outdated
Show resolved
Hide resolved
hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/inject/HazelcastObjectUpsertTarget.java
Outdated
Show resolved
Hide resolved
hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/schema/TypesUtils.java
Outdated
Show resolved
Hide resolved
hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/PlanExecutor.java
Outdated
Show resolved
Hide resolved
This reverts commit f70429c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a very superficial review from the client's perspective, it looked okay. I just have one objection, but it is a simple thing, and I will therefore approve this.
But, I would like to spend more time on this PR after BETA release to do a proper review
# Conflicts: # hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/schema/TablesStorage.java
…ject-based' into feature/5.1/nested-data-types-object-based
hazelcast/src/main/java/com/hazelcast/jet/impl/util/ReflectionUtils.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private boolean isPrimitive(Class<?> clazz) { | ||
return clazz.getPackage().getName().startsWith("java."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, String
is also primitive. It's a sanity check, it should not normally happen. I think we can convert it to an assert.
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] ClientMapPartitionLostListenerTest.test_mapPartitionLostListener_invoked_fromOtherNode:133->assertProxyExistsEventually:163->HazelcastTestSupport.assertTrueEventually:1338->HazelcastTestSupport.assertTrueEventually:1236 There is no proxy with name 2568f76e-21e5-4de1-8449-2ad16d2918b6 created (yet) [INFO] [ERROR] Tests run: 50737, Failures: 1, Errors: 0, Skipped: 238 [INFO] |
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] QueueDestroyTest.checkStatsMapEntryRemovedWhenQueueDestroyed:78 expected:<0> but was:<1> [INFO] [ERROR] Tests run: 50737, Failures: 1, Errors: 0, Skipped: 238 [INFO] |
Adds support for nested fields for Java classes, WIP.
Changes behavior of default OBJECT type to support nested fields.