You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "zoudan (via GitHub)" <gi...@apache.org> on 2023/07/03 03:53:34 UTC
[GitHub] [calcite] zoudan opened a new pull request, #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
zoudan opened a new pull request, #3290:
URL: https://github.com/apache/calcite/pull/3290
(no comment)
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] zoudan commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "zoudan (via GitHub)" <gi...@apache.org>.
zoudan commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1255153032
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
@tanclary IMO, people can easily confuse `string` and `varchar`, as we described in [CALCITE-5777](https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-5777?filter=myopenissues).
STRING_TYPES not only contains CHAR_TYPES, but also BINARY_TYPES.
`public static final List<SqlTypeName> STRING_TYPES =
combine(CHAR_TYPES, BINARY_TYPES);`
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] ILuffZhe commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1254445710
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
Agree with Dan, we should use Calcite's type names when describing the func.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1623638847
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=3290)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list) [89.3% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1623711129
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=3290)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list) [89.3% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1627986711
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=3290)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list) [89.3% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] tanclary commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "tanclary (via GitHub)" <gi...@apache.org>.
tanclary commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1624017793
> +1. Hi @tanclary , do you have any other comments? I think this PR is in a good shape now.
I think it looks good as well, the only thing I am confused about is the documentation question but I ask more out of curiosity.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] tanclary commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "tanclary (via GitHub)" <gi...@apache.org>.
tanclary commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1256055904
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
That makes sense, thanks for explaining
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] zoudan commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "zoudan (via GitHub)" <gi...@apache.org>.
zoudan commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1254112706
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
Should we use types in the related libs or in calcite? I think it is the latter.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1617242727
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=3290)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3290&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3290&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list) [89.3% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3290&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] ILuffZhe commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1254366848
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -4174,6 +4174,37 @@ static void checkRlikeFails(SqlOperatorFixture f) {
f0.forEachLibrary(libraries, consumer);
}
+ @Test void testToHex() {
+ final SqlOperatorFixture f0 = fixture().setFor(SqlLibraryOperators.TO_HEX);
+ f0.checkFails("^to_hex(x'')^",
+ "No match found for function signature TO_HEX\\(<BINARY>\\)",
+ false);
+ final SqlOperatorFixture f = f0.withLibrary(SqlLibrary.BIG_QUERY);
+ f.checkString("to_hex(x'00010203AAEEEFFF')",
+ "00010203aaeeefff",
+ "VARCHAR NOT NULL");
+ f.checkString("to_hex(x'')", "", "VARCHAR NOT NULL");
+ f.checkNull("to_hex(cast (null as varbinary))");
Review Comment:
I noticed that there is a blank space after `cast`, shall we remove it? So as the following test.
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -1247,6 +1247,20 @@ private static RelDataType deriveTypeMapFromArrays(SqlOperatorBinding opBinding)
OperandTypes.STRING,
SqlFunctionCategory.STRING);
+ @LibraryOperator(libraries = {BIG_QUERY})
Review Comment:
How about adding some java doc for those two functions? It helps others to understand better without browsing the JIRA description.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] zoudan commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "zoudan (via GitHub)" <gi...@apache.org>.
zoudan commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1254389985
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -1247,6 +1247,20 @@ private static RelDataType deriveTypeMapFromArrays(SqlOperatorBinding opBinding)
OperandTypes.STRING,
SqlFunctionCategory.STRING);
+ @LibraryOperator(libraries = {BIG_QUERY})
Review Comment:
@ILuffZhe Thanks for your suggestion, I have updated my branch. Please take a look when you have time.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] tanclary commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "tanclary (via GitHub)" <gi...@apache.org>.
tanclary commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1253754249
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
why `VARCHAR` and not `STRING`?
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] ILuffZhe merged pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe merged PR #3290:
URL: https://github.com/apache/calcite/pull/3290
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] tanclary commented on a diff in pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "tanclary (via GitHub)" <gi...@apache.org>.
tanclary commented on code in PR #3290:
URL: https://github.com/apache/calcite/pull/3290#discussion_r1254704982
##########
site/_docs/reference.md:
##########
@@ -2752,6 +2752,8 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | FROM_BASE32(string) | Returns the decoded result of a base-32 *string* as a string
| m | TO_BASE64(string) | Converts the *string* to base-64 encoded form and returns a encoded string
| b m | FROM_BASE64(string) | Returns the decoded result of a base-64 *string* as a string
+| b | TO_HEX(binary) | Converts *binary* into a hexadecimal varchar
+| b | FROM_HEX(varchar) | Converts a hexadecimal-encoded *varchar* into bytes
Review Comment:
That makes sense to me, do you know why many of the functions use `string` in their documentation?
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] ILuffZhe commented on pull request #3290: [CALCITE-5782] Add TO_HEX and FROM_HEX functions (enabled in BigQuery library)
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on PR #3290:
URL: https://github.com/apache/calcite/pull/3290#issuecomment-1626382549
Hi @zoudan, could you please rebase and squash the commits? I think the PR is ready to merge.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org