stoty commented on PR #1490: URL: https://github.com/apache/phoenix/pull/1490#issuecomment-1228096196
There two open issues: 1. The new litarals don't work with BINARY ARRAYS. I suspect that this is not a new problem, so I'm not terribly concerned about that. 2. The way we convert binaries to strings is inconsitent: On one hand, we have the Formatters that are used for VARBINARY (and now BINARY) results, on the other we have the toStringLiteral() method in the P*BBinary classes, which are used for Statement.toString(), and for BINARY_ARRAY (which doesn't have an explicit Formatter set) Before the patch, the formatter generated _'AABB'_, which the toStringLiteral() methods returned _'[170, 187]'_ With my patch, the formatter is the same, only it's now also set for BINARY, while previously it was only set for VARBINARY. I've changed the toStringLiteral() formatter to return a valid binary string literal, _X'AABB'_ , so now stmt.toString() generates valid SQL. The complicate things, it seems that Oracle and Mysql simply returns something like new String(byte[]) for getString(), so the Phoenix behaviour is unique. I don't think that this is show-stopper either, the patch doesn't make any of those problems any worse. -- 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]
