uranusjr commented on code in PR #34891:
URL: https://github.com/apache/airflow/pull/34891#discussion_r1357810354
##########
airflow/providers/postgres/hooks/postgres.py:
##########
@@ -320,6 +320,36 @@ def _generate_insert_sql(
return sql
+ def ingest_embedding(
+ self, table: str, input_data: list[str], embeddings: list[float],
vector_size: int
Review Comment:
Instead of accepting two lists I feel it’d be more natural to accept a list
of two tuples. Or better, an iterable since that’s the only required interface
(for the for loop).
i.e.
```suggestion
self,
table: str,
input_data: Iterable[tuple[str, float]],
vector_size: int,
```
##########
airflow/providers/postgres/hooks/postgres.py:
##########
@@ -320,6 +320,36 @@ def _generate_insert_sql(
return sql
+ def ingest_embedding(
+ self, table: str, input_data: list[str], embeddings: list[float],
vector_size: int
Review Comment:
Instead of accepting two lists I feel it’d be more natural to accept a list
of two tuples. Or better, an iterable since that’s the only required interface
(for the for loop).
i.e.
```suggestion
self,
table: str,
input_data: Iterable[tuple[str, float]],
vector_size: int,
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]