Copilot commented on code in PR #16658:
URL: https://github.com/apache/pinot/pull/16658#discussion_r2291509837
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java:
##########
@@ -91,6 +94,11 @@ public void tearDown()
FileUtils.deleteDirectory(_tempDir);
}
+ public JsonNode postQuery(@Language("sql") String query)
Review Comment:
Missing Javadoc for the public method postQuery. According to the coding
guidelines, all public methods should have proper documentation.
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -97,6 +99,28 @@ public static PinotOperatorTable instance() {
InferTypes.FIRST_KNOWN,
OperandTypes.MINUS_OPERATOR.or(OperandTypes.family(SqlTypeFamily.TIMESTAMP,
SqlTypeFamily.TIMESTAMP)));
+ // See the usage of this attribute to see why it is needed
+ public static final SqlPostfixOperator PINOT_IS_NOT_NULL =
+ new SqlPostfixOperator(
+ "IS NOT NULL",
+ SqlKind.OTHER_FUNCTION,
+// SqlKind.IS_NOT_NULL,
+ 28,
+ ReturnTypes.BOOLEAN_NOT_NULL,
+ InferTypes.VARCHAR_1024,
+ OperandTypes.ANY);
+
+ // See the usage of this attribute to see why it is needed
+ public static final SqlPostfixOperator PINOT_IS_NULL =
+ new SqlPostfixOperator(
+ "IS NULL",
+ SqlKind.OTHER_FUNCTION,
+// SqlKind.IS_NULL,
Review Comment:
Remove commented-out code. If this is meant as documentation, consider using
a proper comment block to explain why SqlKind.OTHER_FUNCTION is used instead of
SqlKind.IS_NULL.
```suggestion
```
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -97,6 +99,28 @@ public static PinotOperatorTable instance() {
InferTypes.FIRST_KNOWN,
OperandTypes.MINUS_OPERATOR.or(OperandTypes.family(SqlTypeFamily.TIMESTAMP,
SqlTypeFamily.TIMESTAMP)));
+ // See the usage of this attribute to see why it is needed
+ public static final SqlPostfixOperator PINOT_IS_NOT_NULL =
+ new SqlPostfixOperator(
+ "IS NOT NULL",
+ SqlKind.OTHER_FUNCTION,
+// SqlKind.IS_NOT_NULL,
Review Comment:
Remove commented-out code. If this is meant as documentation, consider using
a proper comment block to explain why SqlKind.OTHER_FUNCTION is used instead of
SqlKind.IS_NOT_NULL.
```suggestion
// See the usage of this attribute to see why it is needed.
// Note: SqlKind.OTHER_FUNCTION is used instead of SqlKind.IS_NOT_NULL
because
// Pinot requires custom handling for IS NOT NULL semantics that differ
from Calcite's
// default implementation. Using SqlKind.OTHER_FUNCTION allows Pinot to
intercept and
// process this operator as needed.
public static final SqlPostfixOperator PINOT_IS_NOT_NULL =
new SqlPostfixOperator(
"IS NOT NULL",
SqlKind.OTHER_FUNCTION,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]