You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Young-Leo (via GitHub)" <gi...@apache.org> on 2025/08/29 06:44:13 UTC
[PR] Fix the issue where string filtering cannot be used in the DEFINE clause [iotdb]
Young-Leo opened a new pull request, #16306:
URL: https://github.com/apache/iotdb/pull/16306
Fix the issue where string filtering cannot be used in the DEFINE clause
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the issue where string filtering cannot be used in the DEFINE clause [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 commented on code in PR #16306:
URL: https://github.com/apache/iotdb/pull/16306#discussion_r2312966806
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/rowpattern/expression/Computation.java:
##########
@@ -129,6 +131,20 @@ private static Computation parse(
// undefined pattern variable is 'true'
BooleanLiteral constExpr = (BooleanLiteral) expression;
return new ConstantComputation(constExpr.getValue());
+ } else if (expression instanceof BinaryLiteral) {
+ BinaryLiteral constExpr = (BinaryLiteral) expression;
+ return new ConstantComputation(constExpr.getValue());
+ } else if (expression instanceof GenericLiteral) {
+ GenericLiteral constExpr = (GenericLiteral) expression;
+ String type = constExpr.getType();
+
+ if ("DATE".equalsIgnoreCase(type)) {
+ String dateStr = constExpr.getValue();
+ int dateInt = Integer.parseInt(dateStr);
+ return new ConstantComputation(dateInt);
+ } else {
+ return new ConstantComputation(constExpr.getValue());
+ }
Review Comment:
when this branch will take effect?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the issue where string filtering cannot be used in the DEFINE clause [iotdb]
Posted by "Young-Leo (via GitHub)" <gi...@apache.org>.
Young-Leo commented on code in PR #16306:
URL: https://github.com/apache/iotdb/pull/16306#discussion_r2312258359
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/rowpattern/expression/PatternExpressionComputation.java:
##########
@@ -161,7 +162,7 @@ private Object getValueFromPartition(
return partition.getFloat(channel, position);
} else if (type instanceof DoubleType) {
return partition.getDouble(channel, position);
- } else if (type instanceof StringType) {
+ } else if (type instanceof StringType || type instanceof BinaryType) {
Review Comment:
Added
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the issue where string filtering cannot be used in the DEFINE clause [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 merged PR #16306:
URL: https://github.com/apache/iotdb/pull/16306
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the issue where string filtering cannot be used in the DEFINE clause [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 commented on code in PR #16306:
URL: https://github.com/apache/iotdb/pull/16306#discussion_r2309319190
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/rowpattern/expression/PatternExpressionComputation.java:
##########
@@ -161,7 +162,7 @@ private Object getValueFromPartition(
return partition.getFloat(channel, position);
} else if (type instanceof DoubleType) {
return partition.getDouble(channel, position);
- } else if (type instanceof StringType) {
+ } else if (type instanceof StringType || type instanceof BinaryType) {
Review Comment:
```suggestion
} else if (type instanceof AbstractVarcharType) {
```
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/rowpattern/expression/PatternExpressionComputation.java:
##########
@@ -161,7 +162,7 @@ private Object getValueFromPartition(
return partition.getFloat(channel, position);
} else if (type instanceof DoubleType) {
return partition.getDouble(channel, position);
- } else if (type instanceof StringType) {
+ } else if (type instanceof StringType || type instanceof BinaryType) {
Review Comment:
And what about BlobType
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org