[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17212235#comment-17212235 ] Ritesh commented on CALCITE-3679: - Hey [~hyuan] I really wanted to work on this issue. But due to some personal reasons I might not be able to work on it this year. > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17109457#comment-17109457 ] Ritesh edited comment on CALCITE-3679 at 5/17/20, 12:38 PM: Yes, you did copy-paste comments without changing the text. As I said, it was my "first impression" but it was not incorrect. _*> Quoting my first comment in PR "This PR is incomplete in terms of functionality and requires alot of refactoring and test cases addition." I understand comments are important But I was more concerned with getting approach reviewed first, I will be more careful with the words. I will correct comments in PR :)*_ Yes, a bug does need a description. Especially when your only description is a link to a web page. (Which may change or disappear in future.) That web page has 7 functions and you only seem to have implemented 1. Implementing just one is fine, if you say you are implementing one. _+*> Agreed, I will update the description after closure on the scope.*+_ No, don't go tell me to read the PR to figure out the scope. You're just saying "it is what it is", which is not helpful. The scope needs to be described in the JIRA case. _*> I didn't mean to say "it is what it is", All I meant was if the scope is not clear it was better to be highlighted in the beginning, lets try not raise concern after 5 months of PR raised where alot of effort has already been invested.*_ I still believe that we need to get the type system sorted out early - i.e. in this PR. _*> Let me check on that and get back. :)*_ I also think that we can get this PR to a state where it can be committed. But realistically, 1.23 is too soon. It will take a few iterations. _*> Agreed, PR should be committed if it is in that state. I didn't intend to be pushy for 1.23 but I also don't want this PR to stay unmerged for long.*_ _*Let me update the PR with your feedback :)*_ was (Author: ritesh.kapoor): Yes, you did copy-paste comments without changing the text. As I said, it was my "first impression" but it was not incorrect. _*> Quoting my first comment in PR "This PR is incomplete in terms of functionality and requires alot of refactoring and test cases addition." I understand comments are important But I was more concerned with getting approach reviewed first, I will be more careful with the words. I will correct comments in PR :)*_ Yes, a bug does need a description. Especially when your only description is a link to a web page. (Which may change or disappear in future.) That web page has 7 functions and you only seem to have implemented 1. Implementing just one is fine, if you say you are implementing one. _+*> Agreed, I will update the description after closure on the scope.*+_ No, don't go tell me to read the PR to figure out the scope. You're just saying "it is what it is", which is not helpful. The scope needs to be described in the JIRA case. _*> I didn't mean to say "it is what it is", All I meant was if the scope is not clear it was better to be highlighted in the beginning, lets not raise concern after 5 months of PR raised where alot of effort has already been invested.*_ I still believe that we need to get the type system sorted out early - i.e. in this PR. _*> Let me check on that and get back. :)*_ I also think that we can get this PR to a state where it can be committed. But realistically, 1.23 is too soon. It will take a few iterations. _*> Agreed, PR should be committed if it is in that state. I didn't intend to be pushy for 1.23 but I also don't want this PR to stay unmerged for long.*_ _*Let me update the PR with your feedback :)*_ > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17109457#comment-17109457 ] Ritesh commented on CALCITE-3679: - Yes, you did copy-paste comments without changing the text. As I said, it was my "first impression" but it was not incorrect. _*> Quoting my first comment in PR "This PR is incomplete in terms of functionality and requires alot of refactoring and test cases addition." I understand comments are important But I was more concerned with getting approach reviewed first, I will be more careful with the words. I will correct comments in PR :)*_ Yes, a bug does need a description. Especially when your only description is a link to a web page. (Which may change or disappear in future.) That web page has 7 functions and you only seem to have implemented 1. Implementing just one is fine, if you say you are implementing one. _+*> Agreed, I will update the description after closure on the scope.*+_ No, don't go tell me to read the PR to figure out the scope. You're just saying "it is what it is", which is not helpful. The scope needs to be described in the JIRA case. _*> I didn't mean to say "it is what it is", All I meant was if the scope is not clear it was better to be highlighted in the beginning, lets not raise concern after 5 months of PR raised where alot of effort has already been invested.*_ I still believe that we need to get the type system sorted out early - i.e. in this PR. _*> Let me check on that and get back. :)*_ I also think that we can get this PR to a state where it can be committed. But realistically, 1.23 is too soon. It will take a few iterations. _*> Agreed, PR should be committed if it is in that state. I didn't intend to be pushy for 1.23 but I also don't want this PR to stay unmerged for long.*_ _*Let me update the PR with your feedback :)*_ > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17102257#comment-17102257 ] Ritesh edited comment on CALCITE-3679 at 5/8/20, 5:04 AM: -- Hi [~julianhyde] _*Your comments are highly de-motivating.*_ First impression is that the PR is rather scruffy. Comments have been copy-pasted without being changed. Lines of whitespace have been added and removed. Some classes have no javadoc. Justify why we need a new class of RexSlot. _*{color:#172b4d}There is no new class RexSlot and If you referring to RexLambdaRef, I believe I have added comment in the PR itself.{color}*_ This case has no real description, so there's no indication of the intended scope. Do we intend to parse, validate, execute? _*If the intended scope was not clear It could have been really nice that this should be pointed out in the beginning itself. Also I believe test cases are self explanatory of what this PR is solving. Might have missed few comments but thats what review is all about.*_ Lambdas in functional programming languages are functions-as-values. They are typed, they allow closures (carrying their environment for later evaluation) and they can be used anywhere that any other value is used. They are beautiful and very powerful. So a half-hearted implementation would make me very sad. _*All I wanted is to contribute, I tried to implement lambda as function arguments, I asked for help alot many times to give me pointers to move ahead. After investing alot of time myself came up with some solution & want community to atleast review my approach.*_ The SQL implementations I have seen (Presto and SparkSQL) have a few built-in higher-order functions (i.e. functions that take lambdas as arguments and/or return lambdas as results) but do not allow user-defined higher-order functions. This makes me sad. A minimal level of functionality for Calcite would include support for lambdas as standalone values (e.g. 'select empno, x -> x + 1 from emp') and adequate typing of lambdas (not 'LAMBDA' but 'FUNCTION' or similar). _*I have just started to contribute in this project and this was my first major feature which I worked on, I couldn't develop full blown lambda functionality without help. Releasing feature in phases is what I believe in.*_ _*I was just looking for guidance so that I could contribute. My efforts counted as half hearted is really making me sad*_ was (Author: ritesh.kapoor): Hi [~julianhyde] _*Your comments are highly de-motivating.*_ First impression is that the PR is rather scruffy. Comments have been copy-pasted without being changed. Lines of whitespace have been added and removed. Some classes have no javadoc. Justify why we need a new class of RexSlot. _*{color:#172b4d}There is no new class RexSlot and If you referring to RexLambdaRef, I believe I have added comment in the PR itself.{color}*_ This case has no real description, so there's no indication of the intended scope. Do we intend to parse, validate, execute? _*If the intended scope was not clear It could have been really nice that this should be pointed out in the beginning itself. Also I believe test cases are self explanatory of what this PR is solving. Might have missed few comments but thats what review is all about.*_ Lambdas in functional programming languages are functions-as-values. They are typed, they allow closures (carrying their environment for later evaluation) and they can be used anywhere that any other value is used. They are beautiful and very powerful. So a half-hearted implementation would make me very sad. _*All I wanted is to contribute, I tried to implement lambda as function arguments, I asked for help alot many times to give me pointers to move ahead. After investing alot of time myself came up with some solution & want community to atleast review my approach.*_ The SQL implementations I have seen (Presto and SparkSQL) have a few built-in higher-order functions (i.e. functions that take lambdas as arguments and/or return lambdas as results) but do not allow user-defined higher-order functions. This makes me sad. A minimal level of functionality for Calcite would include support for lambdas as standalone values (e.g. 'select empno, x -> x + 1 from emp') and adequate typing of lambdas (not 'LAMBDA' but 'FUNCTION' or similar). _*I have just started to contribute in this project and this was my first major feature which I worked on, I couldn't develop full blown lambda functionality without help. Releasing feature in phases is what I believe in.*_ _*I was just looking for guidance so that I could contribute.*_ > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite >
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17102257#comment-17102257 ] Ritesh commented on CALCITE-3679: - Hi [~julianhyde] _*Your comments are highly de-motivating.*_ First impression is that the PR is rather scruffy. Comments have been copy-pasted without being changed. Lines of whitespace have been added and removed. Some classes have no javadoc. Justify why we need a new class of RexSlot. _*{color:#172b4d}There is no new class RexSlot and If you referring to RexLambdaRef, I believe I have added comment in the PR itself.{color}*_ This case has no real description, so there's no indication of the intended scope. Do we intend to parse, validate, execute? _*If the intended scope was not clear It could have been really nice that this should be pointed out in the beginning itself. Also I believe test cases are self explanatory of what this PR is solving. Might have missed few comments but thats what review is all about.*_ Lambdas in functional programming languages are functions-as-values. They are typed, they allow closures (carrying their environment for later evaluation) and they can be used anywhere that any other value is used. They are beautiful and very powerful. So a half-hearted implementation would make me very sad. _*All I wanted is to contribute, I tried to implement lambda as function arguments, I asked for help alot many times to give me pointers to move ahead. After investing alot of time myself came up with some solution & want community to atleast review my approach.*_ The SQL implementations I have seen (Presto and SparkSQL) have a few built-in higher-order functions (i.e. functions that take lambdas as arguments and/or return lambdas as results) but do not allow user-defined higher-order functions. This makes me sad. A minimal level of functionality for Calcite would include support for lambdas as standalone values (e.g. 'select empno, x -> x + 1 from emp') and adequate typing of lambdas (not 'LAMBDA' but 'FUNCTION' or similar). _*I have just started to contribute in this project and this was my first major feature which I worked on, I couldn't develop full blown lambda functionality without help. Releasing feature in phases is what I believe in.*_ _*I was just looking for guidance so that I could contribute.*_ > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17099514#comment-17099514 ] Ritesh commented on CALCITE-3679: - cc: [~zabetak] > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17099512#comment-17099512 ] Ritesh commented on CALCITE-3679: - It would be really great if this feature could make it to 1.23.0 release > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (CALCITE-3849) SUBSTRING Function to support Binary Type
[ https://issues.apache.org/jira/browse/CALCITE-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh resolved CALCITE-3849. - Resolution: Invalid This feature is already implemented > SUBSTRING Function to support Binary Type > - > > Key: CALCITE-3849 > URL: https://issues.apache.org/jira/browse/CALCITE-3849 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3648) MySQL UNCOMPRESS function support
[ https://issues.apache.org/jira/browse/CALCITE-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3648: Description: [https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress] e.g.: {code:java} SELECT UNCOMPRESS(COMPRESS('any string')); -> 'any string' SELECT UNCOMPRESS('any string'); -> NULL {code} Uncompresses a string compressed by the [{{COMPRESS()}}|https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress] function. If the argument is not a compressed value, the result is {{NULL}}. This function uses zlib library for decompression [(https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html|https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html]). Otherwise, the return value is always {{NULL}}. was: [https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress] e.g.: {code:java} SELECT UNCOMPRESS(COMPRESS('any string')); -> 'any string' SELECT UNCOMPRESS('any string'); -> NULL {code} Uncompresses a string compressed by the [{{COMPRESS()}}|https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress] function. If the argument is not a compressed value, the result is {{NULL}}. This function uses zlib library for decompression ( https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html) . Otherwise, the return value is always {{NULL}}. > MySQL UNCOMPRESS function support > - > > Key: CALCITE-3648 > URL: https://issues.apache.org/jira/browse/CALCITE-3648 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress] > e.g.: > {code:java} > SELECT UNCOMPRESS(COMPRESS('any string')); > -> 'any string' > SELECT UNCOMPRESS('any string'); > -> NULL > {code} > Uncompresses a string compressed by the > [{{COMPRESS()}}|https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress] > function. If the argument is not a compressed value, the result is {{NULL}}. > This function uses zlib library for decompression > [(https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html|https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html]). > Otherwise, the return value is always {{NULL}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3648) MySQL UNCOMPRESS function support
[ https://issues.apache.org/jira/browse/CALCITE-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3648: Description: [https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress] e.g.: {code:java} SELECT UNCOMPRESS(COMPRESS('any string')); -> 'any string' SELECT UNCOMPRESS('any string'); -> NULL {code} Uncompresses a string compressed by the [{{COMPRESS()}}|https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress] function. If the argument is not a compressed value, the result is {{NULL}}. This function uses zlib library for decompression ( https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html) . Otherwise, the return value is always {{NULL}}. > MySQL UNCOMPRESS function support > - > > Key: CALCITE-3648 > URL: https://issues.apache.org/jira/browse/CALCITE-3648 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress] > e.g.: > {code:java} > SELECT UNCOMPRESS(COMPRESS('any string')); > -> 'any string' > SELECT UNCOMPRESS('any string'); > -> NULL > {code} > Uncompresses a string compressed by the > [{{COMPRESS()}}|https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress] > function. If the argument is not a compressed value, the result is {{NULL}}. > This function uses zlib library for decompression ( > https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html) > . Otherwise, the return value is always {{NULL}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3726) Allow declaring type objects
[ https://issues.apache.org/jira/browse/CALCITE-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17062417#comment-17062417 ] Ritesh commented on CALCITE-3726: - * Apologies, I would be more careful and descriptive while creating JIRA. * Should we add validation to prevent sub task creation when the issue is resolved. * Should we also add additional custom field in JIRA like "Sql Examples" which can be filled when creating JIRA if it is applicable. * Anything I can do so that this doesn't happen with anybody else? > Allow declaring type objects > > > Key: CALCITE-3726 > URL: https://issues.apache.org/jira/browse/CALCITE-3726 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Fix For: 1.23.0 > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] > e.g. : > > {code:java} > employee_typ(315, 'Francis', 'Logan', 'FLOGAN', > '555.777.', '01-MAY-04', 'SA_MAN', 11000, .15, 101, 110, > address_typ('376 Mission', 'San Francisco', 'CA', '94222')) > {code} > After an object type is defined and installed in the schema, you can use it > to declare objects in any SQL block. For example, you can use the object type > to specify the datatype of an attribute, column, variable, bind variable, > record field, table element, formal parameter, or function result. At run > time, instances of the object type are created; that is, objects of that type > are instantiated. Each object can hold different values. > Such objects follow the usual scope and instantiation rules. In a block or > subprogram, local objects are instantiated when you enter the block or > subprogram and cease to exist when you exit. In a package, objects are > instantiated when you first reference the package and cease to exist when you > end the database session. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Reopened] (CALCITE-3857) Support the nested ROW validation while declaring Objects for Type
[ https://issues.apache.org/jira/browse/CALCITE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reopened CALCITE-3857: - > Support the nested ROW validation while declaring Objects for Type > -- > > Key: CALCITE-3857 > URL: https://issues.apache.org/jira/browse/CALCITE-3857 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (CALCITE-3857) Support the nested ROW validation while declaring Objects for Type
[ https://issues.apache.org/jira/browse/CALCITE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh closed CALCITE-3857. --- Resolution: Invalid > Support the nested ROW validation while declaring Objects for Type > -- > > Key: CALCITE-3857 > URL: https://issues.apache.org/jira/browse/CALCITE-3857 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (CALCITE-3857) Support the nested ROW validation while declaring Objects for Type
[ https://issues.apache.org/jira/browse/CALCITE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh closed CALCITE-3857. --- Resolution: Fixed > Support the nested ROW validation while declaring Objects for Type > -- > > Key: CALCITE-3857 > URL: https://issues.apache.org/jira/browse/CALCITE-3857 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3726) Allow declaring type objects
[ https://issues.apache.org/jira/browse/CALCITE-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061839#comment-17061839 ] Ritesh commented on CALCITE-3726: - * Would be more descriptive when creating JIRA. * I created sub task after it was resolved, there was scope of improvement in this task. [~danny0405] wasn't aware of it, apologies for that. * [~danny0405]/[~julianhyde] I will remove the sub task and add documentation to reference.md. > Allow declaring type objects > > > Key: CALCITE-3726 > URL: https://issues.apache.org/jira/browse/CALCITE-3726 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Fix For: 1.23.0 > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] > e.g. : > > {code:java} > employee_typ(315, 'Francis', 'Logan', 'FLOGAN', > '555.777.', '01-MAY-04', 'SA_MAN', 11000, .15, 101, 110, > address_typ('376 Mission', 'San Francisco', 'CA', '94222')) > {code} > After an object type is defined and installed in the schema, you can use it > to declare objects in any SQL block. For example, you can use the object type > to specify the datatype of an attribute, column, variable, bind variable, > record field, table element, formal parameter, or function result. At run > time, instances of the object type are created; that is, objects of that type > are instantiated. Each object can hold different values. > Such objects follow the usual scope and instantiation rules. In a block or > subprogram, local objects are instantiated when you enter the block or > subprogram and cease to exist when you exit. In a package, objects are > instantiated when you first reference the package and cease to exist when you > end the database session. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3860) MSSQL COMPRESS Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reassigned CALCITE-3860: --- Assignee: Ritesh > MSSQL COMPRESS Function Support > --- > > Key: CALCITE-3860 > URL: https://issues.apache.org/jira/browse/CALCITE-3860 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/compress-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3861) MSSQL DECOMPRESS Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reassigned CALCITE-3861: --- Assignee: Ritesh > MSSQL DECOMPRESS Function Support > - > > Key: CALCITE-3861 > URL: https://issues.apache.org/jira/browse/CALCITE-3861 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/decompress-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3859) MSSQL Compression Functions
[ https://issues.apache.org/jira/browse/CALCITE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17059374#comment-17059374 ] Ritesh commented on CALCITE-3859: - I would like to contribute :) > MSSQL Compression Functions > --- > > Key: CALCITE-3859 > URL: https://issues.apache.org/jira/browse/CALCITE-3859 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3860) MSSQL COMPRESS Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3860: Description: [https://docs.microsoft.com/en-us/sql/t-sql/functions/compress-transact-sql?view=sql-server-ver15] > MSSQL COMPRESS Function Support > --- > > Key: CALCITE-3860 > URL: https://issues.apache.org/jira/browse/CALCITE-3860 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/compress-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3861) MSSQL DECOMPRESS Function Support
Ritesh created CALCITE-3861: --- Summary: MSSQL DECOMPRESS Function Support Key: CALCITE-3861 URL: https://issues.apache.org/jira/browse/CALCITE-3861 Project: Calcite Issue Type: Sub-task Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3861) MSSQL DECOMPRESS Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3861: Description: [https://docs.microsoft.com/en-us/sql/t-sql/functions/decompress-transact-sql?view=sql-server-ver15] > MSSQL DECOMPRESS Function Support > - > > Key: CALCITE-3861 > URL: https://issues.apache.org/jira/browse/CALCITE-3861 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/decompress-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3860) MSSQL COMPRESS Function Support
Ritesh created CALCITE-3860: --- Summary: MSSQL COMPRESS Function Support Key: CALCITE-3860 URL: https://issues.apache.org/jira/browse/CALCITE-3860 Project: Calcite Issue Type: Sub-task Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3859) MSSQL Compression Functions
Ritesh created CALCITE-3859: --- Summary: MSSQL Compression Functions Key: CALCITE-3859 URL: https://issues.apache.org/jira/browse/CALCITE-3859 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3858) MySQL UNCOMPRESSED_LENGTH Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reassigned CALCITE-3858: --- Assignee: Ritesh > MySQL UNCOMPRESSED_LENGTH Function Support > -- > > Key: CALCITE-3858 > URL: https://issues.apache.org/jira/browse/CALCITE-3858 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3858) MySQL UNCOMPRESSED_LENGTH Function Support
Ritesh created CALCITE-3858: --- Summary: MySQL UNCOMPRESSED_LENGTH Function Support Key: CALCITE-3858 URL: https://issues.apache.org/jira/browse/CALCITE-3858 Project: Calcite Issue Type: Sub-task Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3857) Support the nested ROW validation while declaring Objects for Type
Ritesh created CALCITE-3857: --- Summary: Support the nested ROW validation while declaring Objects for Type Key: CALCITE-3857 URL: https://issues.apache.org/jira/browse/CALCITE-3857 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17058123#comment-17058123 ] Ritesh commented on CALCITE-3679: - Thanks [~Chunwei Lei], For taking out time to review this PR :) > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 2h 20m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3849) SUBSTRING Function to support Binary Type
[ https://issues.apache.org/jira/browse/CALCITE-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3849: Summary: SUBSTRING Function to support Binary Type (was: SUBSTRING Function to support binary) > SUBSTRING Function to support Binary Type > - > > Key: CALCITE-3849 > URL: https://issues.apache.org/jira/browse/CALCITE-3849 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3849) SUBSTRING Function to support binary
Ritesh created CALCITE-3849: --- Summary: SUBSTRING Function to support binary Key: CALCITE-3849 URL: https://issues.apache.org/jira/browse/CALCITE-3849 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh [https://docs.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-ver15] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17040591#comment-17040591 ] Ritesh commented on CALCITE-3679: - It would be really nice if we can rollout this feature in 1.22 release? > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 1h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022766#comment-17022766 ] Ritesh commented on CALCITE-3679: - Variables are now resolved, Test cases added. Done with the changes. Need help in PR review. :) > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 1.5h > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019561#comment-17019561 ] Ritesh edited comment on CALCITE-3679 at 1/20/20 3:49 PM: -- Lambda expressions POC is mostly completed, Also, Able to resolve lambda parameters in expression, But still unable to resolve parent scope variables in expression. Any pointers would be helpful :) Working example {code:java} map_filter(map[1, 2, 5, 4], (a,b)->a>b) {code} was (Author: ritesh.kapoor): Lambda expressions POC is mostly completed, Able to resolve lambda parameters in expression, But still unable to resolve parent scope variables in expression. Any pointers would be helpful :) > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 1h 20m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Allow lambda expressions in SQL queries
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019561#comment-17019561 ] Ritesh commented on CALCITE-3679: - Lambda expressions POC is mostly completed, Able to resolve lambda parameters in expression, But still unable to resolve parent scope variables in expression. Any pointers would be helpful :) > Allow lambda expressions in SQL queries > --- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 1h 20m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3726) Allow declaring type objects
[ https://issues.apache.org/jira/browse/CALCITE-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013834#comment-17013834 ] Ritesh commented on CALCITE-3726: - I would like to contribute :) > Allow declaring type objects > > > Key: CALCITE-3726 > URL: https://issues.apache.org/jira/browse/CALCITE-3726 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] > e.g. : > > {code:java} > employee_typ(315, 'Francis', 'Logan', 'FLOGAN', > '555.777.', '01-MAY-04', 'SA_MAN', 11000, .15, 101, 110, > address_typ('376 Mission', 'San Francisco', 'CA', '94222')) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3726) Allow declaring type objects
[ https://issues.apache.org/jira/browse/CALCITE-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3726: Description: [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] e.g. : {code:java} employee_typ(315, 'Francis', 'Logan', 'FLOGAN', '555.777.', '01-MAY-04', 'SA_MAN', 11000, .15, 101, 110, address_typ('376 Mission', 'San Francisco', 'CA', '94222')) {code} was:[https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] > Allow declaring type objects > > > Key: CALCITE-3726 > URL: https://issues.apache.org/jira/browse/CALCITE-3726 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] > e.g. : > > {code:java} > employee_typ(315, 'Francis', 'Logan', 'FLOGAN', > '555.777.', '01-MAY-04', 'SA_MAN', 11000, .15, 101, 110, > address_typ('376 Mission', 'San Francisco', 'CA', '94222')) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3726) Allow declaring type objects
Ritesh created CALCITE-3726: --- Summary: Allow declaring type objects Key: CALCITE-3726 URL: https://issues.apache.org/jira/browse/CALCITE-3726 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh [https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/objects.htm#i7530] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3679) Calcite to support Lambda Expressions
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3679: Summary: Calcite to support Lambda Expressions (was: Calcite to support Lamda Expressions) > Calcite to support Lambda Expressions > - > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Attachments: [CALCITE-3679]_Basic_implementation.patch > > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3679) Calcite to support Lamda Expressions
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3679: Description: [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] > Calcite to support Lamda Expressions > > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Attachments: [CALCITE-3679]_Basic_implementation.patch > > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (CALCITE-3679) Calcite to support Lamda Expressions
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17007966#comment-17007966 ] Ritesh edited comment on CALCITE-3679 at 1/4/20 10:02 AM: -- Please help in resolving lambda variable names in lambda expression. How do we resolve "a" in expression to parameter value any reference would be helpful. e.g. {code:java} (a)->2+2*a {code} was (Author: ritesh.kapoor): Please help in resolving lambda variable names in lambda expression. How do we resolve a in expression to parameter value any reference would be helpful. e.g. {code:java} (a)->2+2*a) {code} > Calcite to support Lamda Expressions > > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Attachments: [CALCITE-3679]_Basic_implementation.patch > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3679) Calcite to support Lamda Expressions
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3679: Attachment: [CALCITE-3679]_Basic_implementation.patch > Calcite to support Lamda Expressions > > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Attachments: [CALCITE-3679]_Basic_implementation.patch > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3679) Calcite to support Lamda Expressions
[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17007966#comment-17007966 ] Ritesh commented on CALCITE-3679: - Please help in resolving lambda variable names in lambda expression. How do we resolve a in expression to parameter value any reference would be helpful. e.g. {code:java} (a)->2+2*a) {code} > Calcite to support Lamda Expressions > > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3679) Calcite to support Lamda Expressions
Ritesh created CALCITE-3679: --- Summary: Calcite to support Lamda Expressions Key: CALCITE-3679 URL: https://issues.apache.org/jira/browse/CALCITE-3679 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3678) Calcite to support map_filter function
Ritesh created CALCITE-3678: --- Summary: Calcite to support map_filter function Key: CALCITE-3678 URL: https://issues.apache.org/jira/browse/CALCITE-3678 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh [https://prestodb.io/docs/current/functions/map.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3648) MySQL UNCOMPRESS function support
[ https://issues.apache.org/jira/browse/CALCITE-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3648: Summary: MySQL UNCOMPRESS function support (was: MySQL DECOMPRESS function support) > MySQL UNCOMPRESS function support > - > > Key: CALCITE-3648 > URL: https://issues.apache.org/jira/browse/CALCITE-3648 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (CALCITE-3646) MySQL compression functions
[ https://issues.apache.org/jira/browse/CALCITE-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005147#comment-17005147 ] Ritesh edited comment on CALCITE-3646 at 12/30/19 6:17 AM: --- I would like to contribute on these features was (Author: ritesh.kapoor): I would like to contribute on these functions > MySQL compression functions > --- > > Key: CALCITE-3646 > URL: https://issues.apache.org/jira/browse/CALCITE-3646 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3648) MySQL DECOMPRESS function support
Ritesh created CALCITE-3648: --- Summary: MySQL DECOMPRESS function support Key: CALCITE-3648 URL: https://issues.apache.org/jira/browse/CALCITE-3648 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3646) MySQL compression functions
[ https://issues.apache.org/jira/browse/CALCITE-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005147#comment-17005147 ] Ritesh commented on CALCITE-3646: - I would like to contribute on these functions > MySQL compression functions > --- > > Key: CALCITE-3646 > URL: https://issues.apache.org/jira/browse/CALCITE-3646 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3647) MySQL COMPRESS function support
Ritesh created CALCITE-3647: --- Summary: MySQL COMPRESS function support Key: CALCITE-3647 URL: https://issues.apache.org/jira/browse/CALCITE-3647 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3646) MySQL compression functions
Ritesh created CALCITE-3646: --- Summary: MySQL compression functions Key: CALCITE-3646 URL: https://issues.apache.org/jira/browse/CALCITE-3646 Project: Calcite Issue Type: New Feature Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3642) Update cassandra tests upgrade from junit4 to junit5
[ https://issues.apache.org/jira/browse/CALCITE-3642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17004415#comment-17004415 ] Ritesh commented on CALCITE-3642: - Seems similar to https://issues.apache.org/jira/browse/CALCITE-3633 > 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 >Assignee: Forward Xu >Priority: Major > > Update `Cassandra` tests upgrade from junit4 to junit5 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3641) Oracle XMLCOMMENT Function Support
Ritesh created CALCITE-3641: --- Summary: Oracle XMLCOMMENT Function Support Key: CALCITE-3641 URL: https://issues.apache.org/jira/browse/CALCITE-3641 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Ritesh [https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions218.htm] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3640) Oracle EXISTSNODE Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17004390#comment-17004390 ] Ritesh commented on CALCITE-3640: - I would like to contribute > Oracle EXISTSNODE Function Support > -- > > Key: CALCITE-3640 > URL: https://issues.apache.org/jira/browse/CALCITE-3640 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions048.htm] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3640) Oracle EXISTSNODE Function Support
[ https://issues.apache.org/jira/browse/CALCITE-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reassigned CALCITE-3640: --- Assignee: Ritesh > Oracle EXISTSNODE Function Support > -- > > Key: CALCITE-3640 > URL: https://issues.apache.org/jira/browse/CALCITE-3640 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions048.htm] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3640) Oracle EXISTSNODE Function Support
Ritesh created CALCITE-3640: --- Summary: Oracle EXISTSNODE Function Support Key: CALCITE-3640 URL: https://issues.apache.org/jira/browse/CALCITE-3640 Project: Calcite Issue Type: Sub-task Reporter: Ritesh [https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions048.htm] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3617) Add BOOL_OR Aggregate Function
[ https://issues.apache.org/jira/browse/CALCITE-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3617: Description: [https://docs.aws.amazon.com/redshift/latest/dg/r_BOOL_OR.html] > Add BOOL_OR Aggregate Function > -- > > Key: CALCITE-3617 > URL: https://issues.apache.org/jira/browse/CALCITE-3617 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Priority: Major > > [https://docs.aws.amazon.com/redshift/latest/dg/r_BOOL_OR.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3616) Add BOOL_AND Aggregate Function
Ritesh created CALCITE-3616: --- Summary: Add BOOL_AND Aggregate Function Key: CALCITE-3616 URL: https://issues.apache.org/jira/browse/CALCITE-3616 Project: Calcite Issue Type: New Feature Reporter: Ritesh [https://docs.aws.amazon.com/redshift/latest/dg/r_BOOL_AND.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3617) Add BOOL_OR Aggregate Function
Ritesh created CALCITE-3617: --- Summary: Add BOOL_OR Aggregate Function Key: CALCITE-3617 URL: https://issues.apache.org/jira/browse/CALCITE-3617 Project: Calcite Issue Type: New Feature Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3604) Fixing locale error message in ExtractValue Function
[ https://issues.apache.org/jira/browse/CALCITE-3604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3604: Summary: Fixing locale error message in ExtractValue Function (was: Tests fail caused by localized exception message) > Fixing locale error message in ExtractValue Function > > > Key: CALCITE-3604 > URL: https://issues.apache.org/jira/browse/CALCITE-3604 > Project: Calcite > Issue Type: Bug > Components: core > Environment: OS: Windows7 > JDK: 1.8.0_121 > Locale: zh_CN >Reporter: Feng Zhu >Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > When I fetch the recent master branch and build it, the tests added in > CALCITE-3552 fail. > For example: *_SqlXmlFunctionsTest_*_#_*_testExtractValue_* > {code:java} > org.apache.calcite.test.SqlXmlFunctionsTest > testExtractValue() FAILED > java.lang.AssertionError: extractValue(cccddd, #) > Expected: is org.apache.calcite.runtime.CalciteException: Illegal > behavior 'javax.xml.xpath.XPathExpressionException: > javax.xml.transform.TransformerException: A location path was expected, but > the following token was encountered: #' EXTRACTVALUE: document: > 'cccddd', xpath expression: '#' > but: was behavior 'javax.xml.xpath.XPathExpressionException: > javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: #' EXTRACTVALUE: > document: 'cccddd', xpath expression: '#'> > at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18) > at > org.apache.calcite.test.SqlXmlFunctionsTest.assertFailed(SqlXmlFunctionsTest.java:70) > at > org.apache.calcite.test.SqlXmlFunctionsTest.assertExtractValueFailed(SqlXmlFunctionsTest.java:61) > at > org.apache.calcite.test.SqlXmlFunctionsTest.testExtractValue(SqlXmlFunctionsTest.java:47) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3551) MySQL XML Functions Support
[ https://issues.apache.org/jira/browse/CALCITE-3551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3551: Issue Type: New Feature (was: Bug) > MySQL XML Functions Support > --- > > Key: CALCITE-3551 > URL: https://issues.apache.org/jira/browse/CALCITE-3551 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html|https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html#function_updatexml] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3579) Oracle XMLTRANSFORM Function Support
Ritesh created CALCITE-3579: --- Summary: Oracle XMLTRANSFORM Function Support Key: CALCITE-3579 URL: https://issues.apache.org/jira/browse/CALCITE-3579 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3578) Oracle XML Functions
[ https://issues.apache.org/jira/browse/CALCITE-3578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3578: Issue Type: New Feature (was: Bug) > Oracle XML Functions > > > Key: CALCITE-3578 > URL: https://issues.apache.org/jira/browse/CALCITE-3578 > Project: Calcite > Issue Type: New Feature >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3578) Oracle XML Functions
Ritesh created CALCITE-3578: --- Summary: Oracle XML Functions Key: CALCITE-3578 URL: https://issues.apache.org/jira/browse/CALCITE-3578 Project: Calcite Issue Type: Bug Reporter: Ritesh Assignee: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3552) Support MySQL ExtractValue function
[ https://issues.apache.org/jira/browse/CALCITE-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh reassigned CALCITE-3552: --- Assignee: Ritesh > Support MySQL ExtractValue function > --- > > Key: CALCITE-3552 > URL: https://issues.apache.org/jira/browse/CALCITE-3552 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3551) MySQL XML Functions Support
[ https://issues.apache.org/jira/browse/CALCITE-3551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16986151#comment-16986151 ] Ritesh commented on CALCITE-3551: - I would like to implement the above functionalities > MySQL XML Functions Support > --- > > Key: CALCITE-3551 > URL: https://issues.apache.org/jira/browse/CALCITE-3551 > Project: Calcite > Issue Type: Bug >Reporter: Ritesh >Assignee: Ritesh >Priority: Major > > [https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html|https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html#function_updatexml] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3553) Support MySQL UpdateXML function
Ritesh created CALCITE-3553: --- Summary: Support MySQL UpdateXML function Key: CALCITE-3553 URL: https://issues.apache.org/jira/browse/CALCITE-3553 Project: Calcite Issue Type: Sub-task Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3552) Support MySQL ExtractValue function
[ https://issues.apache.org/jira/browse/CALCITE-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-3552: Summary: Support MySQL ExtractValue function (was: Support MySQL ExtractValue) > Support MySQL ExtractValue function > --- > > Key: CALCITE-3552 > URL: https://issues.apache.org/jira/browse/CALCITE-3552 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3552) Support MySQL ExtractValue
Ritesh created CALCITE-3552: --- Summary: Support MySQL ExtractValue Key: CALCITE-3552 URL: https://issues.apache.org/jira/browse/CALCITE-3552 Project: Calcite Issue Type: Sub-task Reporter: Ritesh -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3551) MySQL XML Functions Support
Ritesh created CALCITE-3551: --- Summary: MySQL XML Functions Support Key: CALCITE-3551 URL: https://issues.apache.org/jira/browse/CALCITE-3551 Project: Calcite Issue Type: Bug Reporter: Ritesh Assignee: Ritesh [https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html|https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html#function_updatexml] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-2869) JSON data type support
[ https://issues.apache.org/jira/browse/CALCITE-2869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16802490#comment-16802490 ] Ritesh commented on CALCITE-2869: - Hi [~zhztheplayer] Please help and suggest if something is pending in this task > JSON data type support > -- > > Key: CALCITE-2869 > URL: https://issues.apache.org/jira/browse/CALCITE-2869 > Project: Calcite > Issue Type: Sub-task >Reporter: Hongze Zhang >Priority: Major > > Some references about JSON data type in other SQL implementations: > 1. [https://dev.mysql.com/doc/refman/8.0/en/json.html] > 2. [https://www.postgresql.org/docs/9.5/datatype-json.html] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2870) Support for JSON query quotes behavior
[ https://issues.apache.org/jira/browse/CALCITE-2870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16785735#comment-16785735 ] Ritesh commented on CALCITE-2870: - Hi [~zhztheplayer], it would be helpful if you could share some examples > Support for JSON query quotes behavior > -- > > Key: CALCITE-2870 > URL: https://issues.apache.org/jira/browse/CALCITE-2870 > Project: Calcite > Issue Type: Sub-task >Reporter: Hongze Zhang >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2881) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16785517#comment-16785517 ] Ritesh commented on CALCITE-2881: - Thanks [~zhztheplayer] > Add the JSON_PRETTY function > > > Key: CALCITE-2881 > URL: https://issues.apache.org/jira/browse/CALCITE-2881 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > Labels: pull-request-available > Fix For: 1.19.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > ``` > JSON_PRETTY(*json_doc*) > ``` > Returns the pretty formatted JSON document. Returns `NULL` if any argument is > `NULL` or if JSON document is invalid. > Example Sql: > ```sql > SELECT JSON_PRETTY(v) AS c1 > FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v) > limit 10 > ``` > Result: > c1 > { "a" : [ 10, true ], "b" : [ 10, true ] } -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2881) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16780581#comment-16780581 ] Ritesh commented on CALCITE-2881: - Hi [~zhztheplayer], I have updated the PR's title identical to issue title > Add the JSON_PRETTY function > > > Key: CALCITE-2881 > URL: https://issues.apache.org/jira/browse/CALCITE-2881 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > ``` > JSON_PRETTY(*json_doc*) > ``` > Returns the pretty formatted JSON document. Returns `NULL` if any argument is > `NULL` or if JSON document is invalid. > Example Sql: > ```sql > SELECT JSON_PRETTY(v) AS c1 > FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v) > limit 10 > ``` > Result: > c1 > { "a" : [ 10, true ], "b" : [ 10, true ] } -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2881) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-2881: Description: ``` JSON_PRETTY(*json_doc*) ``` Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid. Example Sql: ```sql SELECT JSON_PRETTY(v) AS c1 FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v) limit 10 ``` Result: c1 { "a" : [ 10, true ], "b" : [ 10, true ] } was: ``` JSON_PRETTY(*json_string_doc*) ``` Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid. Example Sql: ```sql SELECT JSON_PRETTY(v) AS c1 FROM (VALUES ('\{"a": [10, true],"b": [10, true]}')) as t(v) limit 10 ``` Result: c1 { "a" : [ 10, true ], "b" : [ 10, true ] } > Add the JSON_PRETTY function > > > Key: CALCITE-2881 > URL: https://issues.apache.org/jira/browse/CALCITE-2881 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Priority: Major > > ``` > JSON_PRETTY(*json_doc*) > ``` > Returns the pretty formatted JSON document. Returns `NULL` if any argument is > `NULL` or if JSON document is invalid. > Example Sql: > ```sql > SELECT JSON_PRETTY(v) AS c1 > FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v) > limit 10 > ``` > Result: > c1 > { "a" : [ 10, true ], "b" : [ 10, true ] } -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2880) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh updated CALCITE-2880: Description: ``` JSON_PRETTY(**json_string_doc**) ``` Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid. Example Sql: ```sql SELECT JSON_PRETTY(v) AS c1 FROM (VALUES ('\{"a": [10, true],"b": [10, true]}')) as t(v) limit 10 ``` Result: |c1| || |{ "a" : [ 10, true ], "b" : [ 10, true ] }| was: ``` JSON_LENGTH(**json_doc**[, *path*]) ``` Returns the length of a JSON document, or, if a *path* argument is given, the length of the value within the document identified by the path. Returns `NULL` if any argument is `NULL` or the *path* argument does not identify a value in the document. 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 length of a document is determined as follows: - The length of a scalar is 1. - The length of an array is the number of array elements. - The length of an object is the number of object members. - The length does not count the length of nested arrays or objects. Example Sql: ```sql SELECT JSON_LENGTH(v, 'lax $' ERROR ON ERROR) AS c1 ,JSON_LENGTH(v, 'lax $.a' ERROR ON ERROR) AS c2 ,JSON_LENGTH(v, 'strict $.a[0]' ERROR ON ERROR) AS c3 ,JSON_LENGTH(v, 'strict $.a[1]' ERROR ON ERROR) AS c4 FROM (VALUES ('\{"a": [10, true]}')) AS t(v) limit 10; ``` Result: | c1 | c2 | c3 | c4 | | | | | | | 1 | 2 | 1 | 1 | > Add the JSON_PRETTY function > - > > Key: CALCITE-2880 > URL: https://issues.apache.org/jira/browse/CALCITE-2880 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Forward Xu >Priority: Major > Labels: pull-request-available > > ``` > JSON_PRETTY(**json_string_doc**) > ``` > Returns the pretty formatted JSON document. Returns `NULL` if any argument is > `NULL` or if JSON document is invalid. > Example Sql: > ```sql > SELECT JSON_PRETTY(v) AS c1 > FROM (VALUES ('\{"a": [10, true],"b": [10, true]}')) as t(v) > limit 10 > ``` > Result: > |c1| > || > |{ > "a" : [ 10, true ], > "b" : [ 10, true ] > }| > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2881) Add the JSON_PRETTY function
Ritesh created CALCITE-2881: --- Summary: Add the JSON_PRETTY function Key: CALCITE-2881 URL: https://issues.apache.org/jira/browse/CALCITE-2881 Project: Calcite Issue Type: Sub-task Reporter: Ritesh ``` JSON_PRETTY(*json_string_doc*) ``` Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid. Example Sql: ```sql SELECT JSON_PRETTY(v) AS c1 FROM (VALUES ('\{"a": [10, true],"b": [10, true]}')) as t(v) limit 10 ``` Result: c1 { "a" : [ 10, true ], "b" : [ 10, true ] } -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (CALCITE-2880) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritesh closed CALCITE-2880. --- Resolution: Invalid > Add the JSON_PRETTY function > - > > Key: CALCITE-2880 > URL: https://issues.apache.org/jira/browse/CALCITE-2880 > Project: Calcite > Issue Type: Sub-task >Reporter: Ritesh >Assignee: Forward Xu >Priority: Major > Labels: pull-request-available > > ``` > JSON_PRETTY(**json_string_doc**) > ``` > Returns the pretty formatted JSON document. Returns `NULL` if any argument is > `NULL` or if JSON document is invalid. > Example Sql: > ```sql > SELECT JSON_PRETTY(v) AS c1 > FROM (VALUES ('\{"a": [10, true],"b": [10, true]}')) as t(v) > limit 10 > ``` > Result: > |c1| > || > |{ > "a" : [ 10, true ], > "b" : [ 10, true ] > }| > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2880) Add the JSON_PRETTY function
Ritesh created CALCITE-2880: --- Summary: Add the JSON_PRETTY function Key: CALCITE-2880 URL: https://issues.apache.org/jira/browse/CALCITE-2880 Project: Calcite Issue Type: Sub-task Reporter: Ritesh Assignee: Forward Xu ``` JSON_LENGTH(**json_doc**[, *path*]) ``` Returns the length of a JSON document, or, if a *path* argument is given, the length of the value within the document identified by the path. Returns `NULL` if any argument is `NULL` or the *path* argument does not identify a value in the document. 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 length of a document is determined as follows: - The length of a scalar is 1. - The length of an array is the number of array elements. - The length of an object is the number of object members. - The length does not count the length of nested arrays or objects. Example Sql: ```sql SELECT JSON_LENGTH(v, 'lax $' ERROR ON ERROR) AS c1 ,JSON_LENGTH(v, 'lax $.a' ERROR ON ERROR) AS c2 ,JSON_LENGTH(v, 'strict $.a[0]' ERROR ON ERROR) AS c3 ,JSON_LENGTH(v, 'strict $.a[1]' ERROR ON ERROR) AS c4 FROM (VALUES ('\{"a": [10, true]}')) AS t(v) limit 10; ``` Result: | c1 | c2 | c3 | c4 | | | | | | | 1 | 2 | 1 | 1 | -- This message was sent by Atlassian JIRA (v7.6.3#76005)