aglinxinyuan commented on code in PR #9679:
URL: https://github.com/apache/texera/pull/9679#discussion_r4690590838
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDescSpec.scala:
##########
@@ -470,37 +360,20 @@ class TextInputSourceOpDescSpec extends AnyFlatSpec with
BeforeAndAfter {
}
}
- /** The configured text read as STRING lines by the executor the engine
runs. */
- private def linesFromEngine(): Seq[String] = {
+ /** Every tuple produced for the configured text by the executor the engine
runs. */
+ private def tuplesFromEngine(): List[Tuple] = {
val exec = new
TextInputSourceOpExec(objectMapper.writeValueAsString(textInputSourceOpDesc))
exec.open()
try {
exec
.produceTuple()
- .map(
- _.asInstanceOf[SchemaEnforceable]
- .enforceSchema(textInputSourceOpDesc.sourceSchema())
- .getField[String]("line")
- )
- .toSeq
+
.map(_.asInstanceOf[SchemaEnforceable].enforceSchema(textInputSourceOpDesc.sourceSchema()))
+ .toList
} finally exec.close()
}
- /** The configured text read as booleans by the executor the engine runs. */
- private def booleansFromEngine(): Seq[Boolean] = {
- val exec = new
TextInputSourceOpExec(objectMapper.writeValueAsString(textInputSourceOpDesc))
- exec.open()
- try {
- exec
- .produceTuple()
- .map(
- _.asInstanceOf[SchemaEnforceable]
- .enforceSchema(textInputSourceOpDesc.sourceSchema())
- .getField[Boolean]("line")
- )
- .toSeq
- } finally exec.close()
- }
+ /** The configured text read as STRING lines by the executor the engine
runs. */
Review Comment:
Took your wording in f5b423b28c, so the comment also holds for the two
SINGLE_STRING cases.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]