This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 4e1c8fc94f Adding alias for Transform function type registry (#11094)
4e1c8fc94f is described below
commit 4e1c8fc94f405c4a2e06ac8db22f778d0a885598
Author: Xiang Fu <[email protected]>
AuthorDate: Wed Jul 12 15:10:58 2023 -0700
Adding alias for Transform function type registry (#11094)
---
.github/workflows/scripts/.pinot_quickstart.sh | 12 ++++++++++--
.../apache/pinot/common/function/TransformFunctionType.java | 10 +++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/scripts/.pinot_quickstart.sh
b/.github/workflows/scripts/.pinot_quickstart.sh
index e04450a051..d78f647c0c 100755
--- a/.github/workflows/scripts/.pinot_quickstart.sh
+++ b/.github/workflows/scripts/.pinot_quickstart.sh
@@ -159,6 +159,8 @@ do
sleep 2
done
+PASS=0
+
# Validate V2 query count(*) result
for i in $(seq 1 150)
do
@@ -173,13 +175,15 @@ do
sleep 2
done
+PASS=0
+
# Validate V2 join query results
for i in $(seq 1 150)
do
QUERY_RES=`curl -X POST --header 'Accept: application/json' -d '{"sql":"SET
useMultistageEngine=true;SELECT a.playerName, a.teamID, b.teamName FROM
baseballStats_OFFLINE AS a JOIN dimBaseballTeams_OFFLINE AS b ON a.teamID =
b.teamID LIMIT 10","trace":false}' http://localhost:8099/query/sql`
if [ $? -eq 0 ]; then
RES_0=`echo "${QUERY_RES}" | jq '.resultTable.rows[0][0]'`
- if [[ "${RES_0}" = "David Allan" ]]; then
+ if [[ "${RES_0}" = "\"David Allan\"" ]]; then
PASS=1
break
fi
@@ -218,6 +222,8 @@ do
sleep 2
done
+PASS=0
+
# Validate V2 query count(*) result
for i in $(seq 1 150)
do
@@ -232,13 +238,15 @@ do
sleep 2
done
+PASS=0
+
# Validate V2 join query results
for i in $(seq 1 150)
do
QUERY_RES=`curl -X POST --header 'Accept: application/json' -d '{"sql":"SET
useMultistageEngine=true;SELECT a.playerName, a.teamID, b.teamName FROM
baseballStats_OFFLINE AS a JOIN dimBaseballTeams_OFFLINE AS b ON a.teamID =
b.teamID LIMIT 10","trace":false}' http://localhost:8000/query/sql`
if [ $? -eq 0 ]; then
RES_0=`echo "${QUERY_RES}" | jq '.resultTable.rows[0][0]'`
- if [[ "${RES_0}" = "David Allan" ]]; then
+ if [[ ${RES_0} = "\"David Allan\"" ]]; then
PASS=1
break
fi
diff --git
a/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java
b/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java
index 5a262ff299..f6351474bd 100644
---
a/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java
+++
b/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java
@@ -93,14 +93,14 @@ public enum TransformFunctionType {
ReturnTypes.cascade(opBinding ->
positionalReturnTypeInferenceFromStringLiteral(opBinding, 2,
SqlTypeName.VARCHAR), SqlTypeTransforms.FORCE_NULLABLE),
OperandTypes.family(ImmutableList.of(SqlTypeFamily.ANY,
SqlTypeFamily.CHARACTER, SqlTypeFamily.CHARACTER,
- SqlTypeFamily.CHARACTER), ordinal -> ordinal > 2)),
+ SqlTypeFamily.CHARACTER), ordinal -> ordinal > 2),
"json_extract_scalar"),
JSONEXTRACTKEY("jsonExtractKey", ReturnTypes.TO_ARRAY,
- OperandTypes.family(ImmutableList.of(SqlTypeFamily.ANY,
SqlTypeFamily.CHARACTER))),
+ OperandTypes.family(ImmutableList.of(SqlTypeFamily.ANY,
SqlTypeFamily.CHARACTER)), "json_extract_key"),
// date time functions
- TIMECONVERT("timeConvert"),
- DATETIMECONVERT("dateTimeConvert"),
- DATETRUNC("dateTrunc"),
+ TIMECONVERT("timeConvert", "time_convert"),
+ DATETIMECONVERT("dateTimeConvert", "date_time_convert"),
+ DATETRUNC("dateTrunc", "datetrunc"),
YEAR("year"),
YEAR_OF_WEEK("yearOfWeek", "yow"),
QUARTER("quarter"),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]