You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@horaedb.apache.org by "jiacai2050 (via GitHub)" <gi...@apache.org> on 2024/01/19 02:13:19 UTC

[PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

jiacai2050 opened a new pull request, #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446

   ## Rationale
   
   
   ## Detailed Changes
   - Use `get_table_ref` to get `TableReference`, which will not normalize table name
   
   ## Test Plan
   CI 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org


Re: [PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

Posted by "ZuLiangWang (via GitHub)" <gi...@apache.org>.
ZuLiangWang merged PR #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org


Re: [PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

Posted by "ZuLiangWang (via GitHub)" <gi...@apache.org>.
ZuLiangWang commented on code in PR #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446#discussion_r1458259187


##########
src/query_frontend/src/plan.rs:
##########
@@ -125,15 +138,15 @@ impl QueryPlan {
     /// Note: When it timestamp filter evals to false(such as ts < 10 and ts >
     /// 100), it will return None, which means no valid time range for this
     /// query.
-    fn extract_time_range(&self) -> Option<TimeRange> {
-        let ts_column = if let Some(v) = self.find_timestamp_column() {
+    fn extract_time_range(&self) -> Result<Option<TimeRange>> {
+        let ts_column = if let Some(v) = self.find_timestamp_column()? {
             v
         } else {
             warn!(
                 "Couldn't find time column, plan:{:?}, table_name:{:?}",
                 self.df_plan, self.table_name
             );
-            return Some(TimeRange::min_to_max());
+            return Ok(Some(TimeRange::min_to_max()));

Review Comment:
   Consider return `Err(...)` rather than `OK(...)`, expose err to upper layers.
   ```suggestion
               return Ok(Some(TimeRange::min_to_max()));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org


Re: [PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

Posted by "ZuLiangWang (via GitHub)" <gi...@apache.org>.
ZuLiangWang commented on code in PR #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446#discussion_r1458259187


##########
src/query_frontend/src/plan.rs:
##########
@@ -125,15 +138,15 @@ impl QueryPlan {
     /// Note: When it timestamp filter evals to false(such as ts < 10 and ts >
     /// 100), it will return None, which means no valid time range for this
     /// query.
-    fn extract_time_range(&self) -> Option<TimeRange> {
-        let ts_column = if let Some(v) = self.find_timestamp_column() {
+    fn extract_time_range(&self) -> Result<Option<TimeRange>> {
+        let ts_column = if let Some(v) = self.find_timestamp_column()? {
             v
         } else {
             warn!(
                 "Couldn't find time column, plan:{:?}, table_name:{:?}",
                 self.df_plan, self.table_name
             );
-            return Some(TimeRange::min_to_max());
+            return Ok(Some(TimeRange::min_to_max()));

Review Comment:
   Consider return `Err(...)` rather than `OK(...)`, expose err to upper layers.
   ```suggestion
               return Err(...);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org


Re: [PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

Posted by "jiacai2050 (via GitHub)" <gi...@apache.org>.
jiacai2050 commented on code in PR #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446#discussion_r1458394060


##########
src/query_frontend/src/plan.rs:
##########
@@ -125,15 +138,15 @@ impl QueryPlan {
     /// Note: When it timestamp filter evals to false(such as ts < 10 and ts >
     /// 100), it will return None, which means no valid time range for this
     /// query.
-    fn extract_time_range(&self) -> Option<TimeRange> {
-        let ts_column = if let Some(v) = self.find_timestamp_column() {
+    fn extract_time_range(&self) -> Result<Option<TimeRange>> {
+        let ts_column = if let Some(v) = self.find_timestamp_column()? {
             v
         } else {
             warn!(
                 "Couldn't find time column, plan:{:?}, table_name:{:?}",
                 self.df_plan, self.table_name
             );
-            return Some(TimeRange::min_to_max());
+            return Ok(Some(TimeRange::min_to_max()));

Review Comment:
   The error is already checked in `self.find_timestamp_column()?`, the else branch is when query range is not found, such as `select 1`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org


Re: [PR] fix: table name is normalized when find timestamp column [incubator-horaedb]

Posted by "jiacai2050 (via GitHub)" <gi...@apache.org>.
jiacai2050 commented on code in PR #1446:
URL: https://github.com/apache/incubator-horaedb/pull/1446#discussion_r1458394060


##########
src/query_frontend/src/plan.rs:
##########
@@ -125,15 +138,15 @@ impl QueryPlan {
     /// Note: When it timestamp filter evals to false(such as ts < 10 and ts >
     /// 100), it will return None, which means no valid time range for this
     /// query.
-    fn extract_time_range(&self) -> Option<TimeRange> {
-        let ts_column = if let Some(v) = self.find_timestamp_column() {
+    fn extract_time_range(&self) -> Result<Option<TimeRange>> {
+        let ts_column = if let Some(v) = self.find_timestamp_column()? {
             v
         } else {
             warn!(
                 "Couldn't find time column, plan:{:?}, table_name:{:?}",
                 self.df_plan, self.table_name
             );
-            return Some(TimeRange::min_to_max());
+            return Ok(Some(TimeRange::min_to_max()));

Review Comment:
   The error is already return in `self.find_timestamp_column()?`, the else branch is when query range is not found, such as `select 1`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org