jhugomoore commented on code in PR #3184:
URL: https://github.com/apache/calcite/pull/3184#discussion_r1181876156
##########
core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java:
##########
@@ -150,15 +150,36 @@ public BigQuerySqlDialect(SqlDialect.Context context) {
final int rightPrec) {
switch (call.getKind()) {
case POSITION:
- final SqlWriter.Frame frame = writer.startFunCall("STRPOS");
- writer.sep(",");
- call.operand(1).unparse(writer, leftPrec, rightPrec);
- writer.sep(",");
- call.operand(0).unparse(writer, leftPrec, rightPrec);
+ if (2 == call.operandCount()) {
Review Comment:
Main reason I couldn't do that was due to wanting to unparse a position()
with 2 operands into STRPOS, but 3 or 4 operands into INSTR. I think I'll just
unparsing position into INSTR no matter what because it fully encompasses the
functionality of STRPOS, let me know if that's an issue
--
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]