[jira] [Created] (CALCITE-6189) Improve FormatElementEnumTest

2024-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-6189:
---

 Summary: Improve FormatElementEnumTest
 Key: CALCITE-6189
 URL: https://issues.apache.org/jira/browse/CALCITE-6189
 Project: Calcite
  Issue Type: Improvement
  Components: tests
Affects Versions: 1.36.0
Reporter: Forward Xu
Assignee: Forward Xu
 Fix For: 1.37.0






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-4338) Support MERGE INTO Clause

2020-10-14 Thread Forward Xu (Jira)
Forward Xu created CALCITE-4338:
---

 Summary: Support MERGE INTO Clause
 Key: CALCITE-4338
 URL: https://issues.apache.org/jira/browse/CALCITE-4338
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


MERGE INTO target_table 
USING source_table 
ON search_condition
 WHEN MATCHED THEN
 UPDATE SET col1 = value1, col2 = value2,...
 WHERE 
 [DELETE WHERE ]
 WHEN NOT MATCHED THEN
 INSERT (col1,col2,...)
 values(value1,value2,...)
 WHERE ;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3941) Add the default mode to the path in the Json functions.

2020-04-20 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3941:
---

 Summary: Add the default mode to the path in the Json functions.
 Key: CALCITE-3941
 URL: https://issues.apache.org/jira/browse/CALCITE-3941
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Forward Xu
Assignee: Forward Xu


Add the default mode to the path in the JSON functions.

before:

json_exists ('\{"foo": "bar"}', 'lax $ .foo') or

json_exists ('\{"foo": "bar"}', 'strict $ .foo')

after:

json_exists ('\{"foo": "bar"}', '$ .foo')



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3724) Implement PrestoSqlDialect

2020-01-10 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3724:
---

 Summary: Implement PrestoSqlDialect
 Key: CALCITE-3724
 URL: https://issues.apache.org/jira/browse/CALCITE-3724
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


Implement PrestoSqlDialect



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3707) Implement COSH function

2020-01-05 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3707:
---

 Summary: Implement COSH function
 Key: CALCITE-3707
 URL: https://issues.apache.org/jira/browse/CALCITE-3707
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


Implement COSH function.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3706) IMPLEMENT POWEROFTWOF FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3706:
---

 Summary: IMPLEMENT POWEROFTWOF FUNCTION 
 Key: CALCITE-3706
 URL: https://issues.apache.org/jira/browse/CALCITE-3706
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT POWEROFTWOF FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3705) IMPLEMENT POWEROFTWOD FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3705:
---

 Summary: IMPLEMENT POWEROFTWOD FUNCTION
 Key: CALCITE-3705
 URL: https://issues.apache.org/jira/browse/CALCITE-3705
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT POWEROFTWOD FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3704) IMPLEMENT TWOTOTHEDOUBLESCALEDOWN FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3704:
---

 Summary: IMPLEMENT TWOTOTHEDOUBLESCALEDOWN FUNCTION
 Key: CALCITE-3704
 URL: https://issues.apache.org/jira/browse/CALCITE-3704
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT TWOTOTHEDOUBLESCALEDOWN FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3703) IMPLEMENT TWOTOTHEDOUBLESCALEUP FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3703:
---

 Summary: IMPLEMENT TWOTOTHEDOUBLESCALEUP FUNCTION
 Key: CALCITE-3703
 URL: https://issues.apache.org/jira/browse/CALCITE-3703
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT TWOTOTHEDOUBLESCALEUP FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3701) IMPLEMENT NEXTDOWN FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3701:
---

 Summary: IMPLEMENT NEXTDOWN FUNCTION
 Key: CALCITE-3701
 URL: https://issues.apache.org/jira/browse/CALCITE-3701
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT NEXTDOWN FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3702) IMPLEMENT SCALB FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3702:
---

 Summary: IMPLEMENT SCALB FUNCTION
 Key: CALCITE-3702
 URL: https://issues.apache.org/jira/browse/CALCITE-3702
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT SCALB FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3700) IMPLEMENT NEXTUP FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3700:
---

 Summary: IMPLEMENT NEXTUP FUNCTION
 Key: CALCITE-3700
 URL: https://issues.apache.org/jira/browse/CALCITE-3700
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT NEXTUP FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3699) IMPLEMENT NEXTAFTER FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3699:
---

 Summary: IMPLEMENT NEXTAFTER FUNCTION
 Key: CALCITE-3699
 URL: https://issues.apache.org/jira/browse/CALCITE-3699
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT NEXTAFTER FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3698) IMPLEMENT GETEXPONENT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3698:
---

 Summary: IMPLEMENT GETEXPONENT FUNCTION
 Key: CALCITE-3698
 URL: https://issues.apache.org/jira/browse/CALCITE-3698
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT GETEXPONENT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3696) IMPLEMENT HYPOT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3696:
---

 Summary: IMPLEMENT HYPOT FUNCTION
 Key: CALCITE-3696
 URL: https://issues.apache.org/jira/browse/CALCITE-3696
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT HYPOT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3697) IMPLEMENT COPYSIGN FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3697:
---

 Summary: IMPLEMENT COPYSIGN FUNCTION
 Key: CALCITE-3697
 URL: https://issues.apache.org/jira/browse/CALCITE-3697
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT COPYSIGN FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3695) IMPLEMENT TANH FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3695:
---

 Summary: IMPLEMENT TANH FUNCTION
 Key: CALCITE-3695
 URL: https://issues.apache.org/jira/browse/CALCITE-3695
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT TANH FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3694) IMPLEMENT SINH FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3694:
---

 Summary: IMPLEMENT SINH FUNCTION
 Key: CALCITE-3694
 URL: https://issues.apache.org/jira/browse/CALCITE-3694
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT SINH FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3693) IMPLEMENT ULP FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3693:
---

 Summary: IMPLEMENT ULP FUNCTION
 Key: CALCITE-3693
 URL: https://issues.apache.org/jira/browse/CALCITE-3693
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT ULP FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3691) IMPLEMENT NEGATEEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3691:
---

 Summary: IMPLEMENT NEGATEEXACT FUNCTION
 Key: CALCITE-3691
 URL: https://issues.apache.org/jira/browse/CALCITE-3691
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT NEGATEEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3692) IMPLEMENT TOINTEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3692:
---

 Summary: IMPLEMENT TOINTEXACT FUNCTION
 Key: CALCITE-3692
 URL: https://issues.apache.org/jira/browse/CALCITE-3692
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT TOINTEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3690) IMPLEMENT DECREMENTEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3690:
---

 Summary: IMPLEMENT DECREMENTEXACT FUNCTION
 Key: CALCITE-3690
 URL: https://issues.apache.org/jira/browse/CALCITE-3690
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT DECREMENTEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3689) IMPLEMENT INCREMENTEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3689:
---

 Summary: IMPLEMENT INCREMENTEXACT FUNCTION
 Key: CALCITE-3689
 URL: https://issues.apache.org/jira/browse/CALCITE-3689
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT INCREMENTEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3688) IMPLEMENT MULTIPLYEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3688:
---

 Summary: IMPLEMENT MULTIPLYEXACT FUNCTION
 Key: CALCITE-3688
 URL: https://issues.apache.org/jira/browse/CALCITE-3688
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT MULTIPLYEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3687) IMPLEMENT SUBTRACTEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3687:
---

 Summary: IMPLEMENT SUBTRACTEXACT FUNCTION
 Key: CALCITE-3687
 URL: https://issues.apache.org/jira/browse/CALCITE-3687
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT SUBTRACTEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3686) IMPLEMENT ADDEXACT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3686:
---

 Summary: IMPLEMENT ADDEXACT FUNCTION
 Key: CALCITE-3686
 URL: https://issues.apache.org/jira/browse/CALCITE-3686
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT ADDEXACT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3685) IMPLEMENT RINT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3685:
---

 Summary: IMPLEMENT RINT FUNCTION
 Key: CALCITE-3685
 URL: https://issues.apache.org/jira/browse/CALCITE-3685
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT RINT FUNCTION



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3684) IMPLEMENT CBRT FUNCTION

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3684:
---

 Summary: IMPLEMENT CBRT FUNCTION
 Key: CALCITE-3684
 URL: https://issues.apache.org/jira/browse/CALCITE-3684
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu
Assignee: Forward Xu


IMPLEMENT CBRT FUNCTION.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3683) Enhanced MATH Function

2020-01-04 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3683:
---

 Summary: Enhanced MATH Function
 Key: CALCITE-3683
 URL: https://issues.apache.org/jira/browse/CALCITE-3683
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Forward Xu






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3642) Update cassandra tests upgrade from junit4 to junit5

2019-12-27 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3642:
---

 Summary: Update cassandra tests upgrade from junit4 to junit5
 Key: CALCITE-3642
 URL: https://issues.apache.org/jira/browse/CALCITE-3642
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


Update `Cassandra` tests upgrade from junit4 to junit5



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3637) Update linq4j tests upgrade from junit4 to junit5

2019-12-26 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3637:
---

 Summary: Update linq4j tests upgrade from junit4 to junit5
 Key: CALCITE-3637
 URL: https://issues.apache.org/jira/browse/CALCITE-3637
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


Update `linq4j` tests upgrade from junit4 to junit5



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3625) Update linq4j tests upgrade from junit4 to junit5

2019-12-23 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3625:
---

 Summary: Update linq4j tests upgrade from junit4 to junit5
 Key: CALCITE-3625
 URL: https://issues.apache.org/jira/browse/CALCITE-3625
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


Update `linq4j` tests upgrade from junit4 to junit5



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3622) Update geode tests upgrade from junit4 to junit5

2019-12-22 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3622:
---

 Summary: Update geode tests upgrade from junit4 to junit5
 Key: CALCITE-3622
 URL: https://issues.apache.org/jira/browse/CALCITE-3622
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


Update `geode` tests upgrade from junit4 to junit5.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3601) Update cassandra, elasticsearch, geode, linq4j, mongodb test upgrade from junit4 to junit5

2019-12-15 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3601:
---

 Summary: Update cassandra, elasticsearch, geode, linq4j, mongodb 
test upgrade from junit4 to junit5
 Key: CALCITE-3601
 URL: https://issues.apache.org/jira/browse/CALCITE-3601
 Project: Calcite
  Issue Type: Test
Reporter: Forward Xu


Update `cassandra, elasticsearch, geode, linq4j, and mongodb` tests upgrade 
from junit4 to junit5.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3510) Implement sqlquery for Redis adapter

2019-11-17 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3510:
---

 Summary: Implement sqlquery for Redis adapter
 Key: CALCITE-3510
 URL: https://issues.apache.org/jira/browse/CALCITE-3510
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


sqlline> select * from "csv_02";
++---+
| DEPTNO | NAME |
++---+
| 20 | Sales |
| 10 | Sales |
++---+
2 rows selected (0.014 seconds)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3329) Implement osquery command for OS adapter

2019-09-07 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3329:
---

 Summary: Implement osquery command for OS adapter
 Key: CALCITE-3329
 URL: https://issues.apache.org/jira/browse/CALCITE-3329
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


Implement osquery command for OS adapter



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Created] (CALCITE-3204) Implement jps command for OS adapter

2019-07-20 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-3204:
---

 Summary: Implement jps command for OS adapter
 Key: CALCITE-3204
 URL: https://issues.apache.org/jira/browse/CALCITE-3204
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


Implement jps command for OS adapter



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (CALCITE-3176) File adapter for parsing JSON files

2019-07-06 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-3176:
---

 Summary: File adapter for parsing JSON files
 Key: CALCITE-3176
 URL: https://issues.apache.org/jira/browse/CALCITE-3176
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


File adapter for parsing JSON files



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-3139) Implement JSON_EXTRACT function

2019-06-22 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-3139:
---

 Summary: Implement JSON_EXTRACT function
 Key: CALCITE-3139
 URL: https://issues.apache.org/jira/browse/CALCITE-3139
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


[{{JSON_EXTRACT(_{{json_doc}}_, _{{path}}_[, _{{path}}_] 
...)}}|https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-extract]

Returns data from a JSON document, selected from the parts of the document 
matched by the _{{path}}_ arguments. Returns {{NULL}} if any argument is 
{{NULL}} or no paths locate a value in the document. An error occurs if the 
_{{json_doc}}_ argument is not a valid JSON document or any _{{path}}_ argument 
is not a valid path expression.

The return value consists of all values matched by the _{{path}}_ arguments. If 
it is possible that those arguments could return multiple values, the matched 
values are autowrapped as an array, in the order corresponding to the paths 
that produced them. Otherwise, the return value is the single matched value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-3130) Implement JSON_UNQUOTE, JSON_QUOTE

2019-06-15 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-3130:
---

 Summary: Implement JSON_UNQUOTE, JSON_QUOTE
 Key: CALCITE-3130
 URL: https://issues.apache.org/jira/browse/CALCITE-3130
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-3005) Implement string functions: LEFT, RIGHT

2019-04-16 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-3005:
---

 Summary: Implement string functions: LEFT, RIGHT
 Key: CALCITE-3005
 URL: https://issues.apache.org/jira/browse/CALCITE-3005
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2995) Add the DAYNAME,MONTHNAME function

2019-04-13 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2995:
---

 Summary: Add the DAYNAME,MONTHNAME function
 Key: CALCITE-2995
 URL: https://issues.apache.org/jira/browse/CALCITE-2995
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


MONTHNAME(date)
 Returns the full name of the month for date. The language used for the name is 
controlled by the value of the lc_time_names system variable.

SQL:
{code:java}
SELECT MONTHNAME('2018-01-01') monthname;{code}
Result:
||monthname||
|January|

DAYNAME(date)
 Returns the name of the weekday for date. The language used for the name is 
controlled by the value of the lc_time_names system variable.

SQL:
{code:java}
SELECT DAYNAME('2018-01-01') dayname;{code}
Result:
||dayname||
|Monday|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2985) Add the JSON_STORAGE_SIZE function

2019-04-08 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2985:
---

 Summary: Add the JSON_STORAGE_SIZE function
 Key: CALCITE-2985
 URL: https://issues.apache.org/jira/browse/CALCITE-2985
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


JSON_STORAGE_SIZE(json_val)

This function returns the number of bytes used to store the binary 
representation of a JSON document. When the argument is a JSON column, this is 
the space used to store the JSON document. json_val must be a valid JSON 
document or a string which can be parsed as one. In the case where it is 
string, the function returns the amount of storage space in the JSON binary 
representation that is created by parsing the string as JSON and converting it 
to binary. It returns NULL if the argument is NULL.

An error results when json_val is not NULL, and is not—or cannot be 
successfully parsed as—a JSON document.

To illustrate this function's behavior when used with a JSON column as its 
argument, we create a table named jtable containing a JSON column jcol, insert 
a JSON value into the table, then obtain the storage space used by this column 
with JSON_STORAGE_SIZE(), as shown here:



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2984) Add the JSON_STORAGE_SIZE function

2019-04-08 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2984:
---

 Summary: Add the JSON_STORAGE_SIZE function
 Key: CALCITE-2984
 URL: https://issues.apache.org/jira/browse/CALCITE-2984
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


JSON_STORAGE_SIZE(json_val)

This function returns the number of bytes used to store the binary 
representation of a JSON document. When the argument is a JSON column, this is 
the space used to store the JSON document. json_val must be a valid JSON 
document or a string which can be parsed as one. In the case where it is 
string, the function returns the amount of storage space in the JSON binary 
representation that is created by parsing the string as JSON and converting it 
to binary. It returns NULL if the argument is NULL.

An error results when json_val is not NULL, and is not—or cannot be 
successfully parsed as—a JSON document.

To illustrate this function's behavior when used with a JSON column as its 
argument, we create a table named jtable containing a JSON column jcol, insert 
a JSON value into the table, then obtain the storage space used by this column 
with JSON_STORAGE_SIZE(), as shown here:



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2975) Add the JSON_REMOVE function

2019-04-02 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2975:
---

 Summary: Add the JSON_REMOVE function
 Key: CALCITE-2975
 URL: https://issues.apache.org/jira/browse/CALCITE-2975
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


JSON_REMOVE(json_doc, path[, path] ...)

Removes data from a JSON document and returns the result. Returns NULL if any 
argument is NULL. An error occurs if the json_doc argument is not a valid JSON 
document or any path argument is not a valid path expression or is $ or 
contains a * or ** wildcard.

The path arguments are evaluated left to right. The document produced by 
evaluating one path becomes the new value against which the next path is 
evaluated.

It is not an error if the element to be removed does not exist in the document; 
in that case, the path does not affect the document.
JSON_REMOVE SQL:

{code:java}
SELECT JSON_REMOVE(v, '$[1]') AS c1
 FROM (VALUES ('["a", ["b", "c"], "d"]')) AS t(v);
{code}

RESULT:

||c1||
|["a", "d"]|






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2892) Add the JSON_KEYS function

2019-03-04 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2892:
---

 Summary: Add the JSON_KEYS function
 Key: CALCITE-2892
 URL: https://issues.apache.org/jira/browse/CALCITE-2892
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


[{{JSON_KEYS(_{{json_doc}}_[, 
_{{path}}_])}}|https://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html#function_json-keys]

Returns the keys from the top-level value of a JSON object as a JSON array, or, 
if a _{{path}}_ argument is given, the top-level keys from the selected path. 
Returns {{NULL}} if any argument is {{NULL}}, the _{{json_doc}}_ argument is 
not an object, or _{{path}}_, if given, does not locate an object. An error 
occurs if the _{{json_doc}}_argument is not a valid JSON document or the 
_{{path}}_ argument is not a valid path expression or contains a {{*}} or 
{{**}} wildcard.

The result array is empty if the selected object is empty. If the top-level 
value has nested subobjects, the return value does not include keys from those 
subobjects.

Example SQL:
{code:java}
// code placeholder
SELECT JSON_KEYS(v) AS c1
,JSON_KEYS(v, 'lax $.a') AS c2
,JSON_KEYS(v, '$.b') AS c3
,JSON_KEYS(v, 'strict $.a[0]') AS c4
,JSON_KEYS(v, 'strict $.a[1]') AS c5
FROM (VALUES ('{"a": [10, true],"b": {"c": 30}}')) AS t(v)
LIMIT 10;
{code}
Result:
||c1||c2||c3||c4||c5||
|["a", "b"]|[NULL]|["c"]|[NULL]|[NULL]|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2884) Add the JSON_INSERT function

2019-03-01 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2884:
---

 Summary: Add the JSON_INSERT function
 Key: CALCITE-2884
 URL: https://issues.apache.org/jira/browse/CALCITE-2884
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


Inserts data into a JSON document and returns the result. Returns {{NULL}} if 
any argument is {{NULL}}. An error occurs if the _{{json_doc}}_ argument is not 
a valid JSON document or any _{{path}}_ argument is not a valid path expression 
or contains a {{*}} or {{**}} wildcard.

The path-value pairs are evaluated left to right. The document produced by 
evaluating one pair becomes the new value against which the next pair is 
evaluated.

A path-value pair for an existing path in the document is ignored and does not 
overwrite the existing document value. A path-value pair for a nonexisting path 
in the document adds the value to the document if the path identifies one of 
these types of values:
 * A member not present in an existing object. The member is added to the 
object and associated with the new value.

 * A position past the end of an existing array. The array is extended with the 
new value. If the existing value is not an array, it is autowrapped as an 
array, then extended with the new value.

Otherwise, a path-value pair for a nonexisting path in the document is ignored 
and has no effect.

For a comparison of 
[{{JSON_INSERT()}}|https://dev.mysql.com/doc/refman/5.7/en/json-modification-functions.html#function_json-insert],
 
[{{JSON_REPLACE()}}|https://dev.mysql.com/doc/refman/5.7/en/json-modification-functions.html#function_json-replace],
 and 
[{{JSON_SET()}}|https://dev.mysql.com/doc/refman/5.7/en/json-modification-functions.html#function_json-set],
 see the discussion of 
[{{JSON_SET()}}|https://dev.mysql.com/doc/refman/5.7/en/json-modification-functions.html#function_json-set].

Example SQL:

SELECT JSON_INSERT(v, '$.a', 10, '$.c', '[true, false]') AS c1
FROM (VALUES ('\{ "a": 1, "b": [2, 3]}')) AS t(v);

Result:

 
||c1||
|{"a": 1, "b": [2, 3], "c": "[true, false]"}|

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CALCITE-2864) Add the JSON_DEPTH function

2019-02-24 Thread Forward Xu (JIRA)
Forward Xu created CALCITE-2864:
---

 Summary: Add the JSON_DEPTH function
 Key: CALCITE-2864
 URL: https://issues.apache.org/jira/browse/CALCITE-2864
 Project: Calcite
  Issue Type: New Feature
Reporter: Forward Xu


Returns the maximum depth of a JSON document. Returns {{NULL}} if the argument 
is {{NULL}}. An error occurs if the argument is not a valid JSON document.

An empty array, empty object, or scalar value has depth 1. A nonempty array 
containing only elements of depth 1 or nonempty object containing only member 
values of depth 1 has depth 2. Otherwise, a JSON document has depth greater 
than 2.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)