You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/04 17:07:28 UTC

[GitHub] [iceberg] ddrinka opened a new pull request, #6123: Python: Support creating a DateLiteral from a date (#6120)

ddrinka opened a new pull request, #6123:
URL: https://github.com/apache/iceberg/pull/6123

   * Renamed date_to_days to date_str_to_days
   
   * Created new date_to_days to convert a Python date object to int days
   
   * Contributes to workaround for #6120


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #6123: Python: Support creating a DateLiteral from a date (#6120)

Posted by GitBox <gi...@apache.org>.
rdblue commented on PR #6123:
URL: https://github.com/apache/iceberg/pull/6123#issuecomment-1304946218

   Thanks, @ddrinka! I merged this.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a diff in pull request #6123: Python: Support creating a DateLiteral from a date (#6120)

Posted by GitBox <gi...@apache.org>.
rdblue commented on code in PR #6123:
URL: https://github.com/apache/iceberg/pull/6123#discussion_r1014891415


##########
python/pyiceberg/utils/datetime.py:
##########
@@ -47,11 +47,16 @@ def micros_to_time(micros: int) -> time:
     return time(hour=hours, minute=minutes, second=seconds, microsecond=microseconds)
 
 
-def date_to_days(date_str: str) -> int:
+def date_str_to_days(date_str: str) -> int:

Review Comment:
   Does this need to be renamed? Why not support both with the same name to avoid a breaking change?



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ddrinka commented on a diff in pull request #6123: Python: Support creating a DateLiteral from a date (#6120)

Posted by GitBox <gi...@apache.org>.
ddrinka commented on code in PR #6123:
URL: https://github.com/apache/iceberg/pull/6123#discussion_r1014897183


##########
python/pyiceberg/utils/datetime.py:
##########
@@ -47,11 +47,16 @@ def micros_to_time(micros: int) -> time:
     return time(hour=hours, minute=minutes, second=seconds, microsecond=microseconds)
 
 
-def date_to_days(date_str: str) -> int:
+def date_str_to_days(date_str: str) -> int:

Review Comment:
   My thought process was that this API is still pre 1.0 and the existing name was misleading, so better to improve it now.  I have no preference either way though, so happy to adjust.  I'm not sure how to support both with the same name though?



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a diff in pull request #6123: Python: Support creating a DateLiteral from a date (#6120)

Posted by GitBox <gi...@apache.org>.
rdblue commented on code in PR #6123:
URL: https://github.com/apache/iceberg/pull/6123#discussion_r1014922674


##########
python/pyiceberg/utils/datetime.py:
##########
@@ -47,11 +47,16 @@ def micros_to_time(micros: int) -> time:
     return time(hour=hours, minute=minutes, second=seconds, microsecond=microseconds)
 
 
-def date_to_days(date_str: str) -> int:
+def date_str_to_days(date_str: str) -> int:

Review Comment:
   Yeah, it probably isn't used anywhere. You're right: better to clean it up.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #6123: Python: Support creating a DateLiteral from a date (#6120)

Posted by GitBox <gi...@apache.org>.
rdblue merged PR #6123:
URL: https://github.com/apache/iceberg/pull/6123


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org