KassieZ commented on code in PR #1230: URL: https://github.com/apache/doris-website/pull/1230#discussion_r1818993004
########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## cut_to_first_significant_subdomain +### description +#### Syntax Review Comment: `## Syntax` ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## cut_to_first_significant_subdomain +### description +#### Syntax + +`VARCHAR cut_to_first_significant_subdomain(VARCHAR url)` + +Extract the part of the domain in the URL from the top-level subdomain down to the "first valid subdomain." If invalid, return an empty string. + +### example Review Comment: `## Examples` ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## cut_to_first_significant_subdomain +### description +#### Syntax + +`VARCHAR cut_to_first_significant_subdomain(VARCHAR url)` + +Extract the part of the domain in the URL from the top-level subdomain down to the "first valid subdomain." If invalid, return an empty string. + +### example + +``` Review Comment: please add fence block, such as ```sql ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## Review Comment: Does v3.0/2.1 also support it? if does, please update also ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## cut_to_first_significant_subdomain +### description Review Comment: `## Description` ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", Review Comment: does the function name case sensitive? should it be all uppercase or lowercase? ########## docs/sql-manual/sql-functions/string-functions/cut-to-first-significant-subdomain.md: ########## @@ -0,0 +1,61 @@ +--- +{ + "title": "Cut_To_First_Significant_Subdomain", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## cut_to_first_significant_subdomain +### description +#### Syntax + +`VARCHAR cut_to_first_significant_subdomain(VARCHAR url)` + +Extract the part of the domain in the URL from the top-level subdomain down to the "first valid subdomain." If invalid, return an empty string. + +### example + +``` +mysql [(none)]>select cut_to_first_significant_subdomain("www.baidu.com"); ++-----------------------------------------------------+ +| cut_to_first_significant_subdomain('www.baidu.com') | ++-----------------------------------------------------+ +| baidu.com | ++-----------------------------------------------------+ + +mysql [(none)]>select cut_to_first_significant_subdomain("www.google.com.cn"); ++---------------------------------------------------------+ +| cut_to_first_significant_subdomain('www.google.com.cn') | ++---------------------------------------------------------+ +| google.com.cn | ++---------------------------------------------------------+ + +mysql [(none)]>select cut_to_first_significant_subdomain("wwwwwwww"); ++------------------------------------------------+ +| cut_to_first_significant_subdomain('wwwwwwww') | ++------------------------------------------------+ +| | ++------------------------------------------------+ +``` + +### keywords Review Comment: ## Keywords -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org